Commit eedd1c07 authored by Nick's avatar Nick

fix: upload hierarchy error

parent e950a3db
...@@ -74,7 +74,7 @@ router.post('/u', multer({ ...@@ -74,7 +74,7 @@ router.post('/u', multer({
} }
// Check if user can upload at path // Check if user can upload at path
const assetPath = (folderId) ? opts.hierarchy.map(h => h.slug).join('/') + `/${fileMeta.originalname}` : fileMeta.originalname const assetPath = (folderId) ? hierarchy.map(h => h.slug).join('/') + `/${fileMeta.originalname}` : fileMeta.originalname
if (!WIKI.auth.checkAccess(req.user, ['write:assets'], { path: assetPath })) { if (!WIKI.auth.checkAccess(req.user, ['write:assets'], { path: assetPath })) {
return res.status(403).json({ return res.status(403).json({
succeeded: false, succeeded: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment