fix: upload hierarchy error

This commit is contained in:
Nick 2019-05-21 19:01:20 -04:00
parent e950a3dbf2
commit eedd1c0707

View File

@ -74,7 +74,7 @@ router.post('/u', multer({
}
// 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 })) {
return res.status(403).json({
succeeded: false,