committed by
syuilo
parent
52225d703b
commit
8ce1d4d6a3
@ -83,7 +83,9 @@ export default define(meta, async (ps, user) => {
|
||||
if (ps.name) folder.name = ps.name;
|
||||
|
||||
if (ps.parentId !== undefined) {
|
||||
if (ps.parentId === null) {
|
||||
if (ps.parentId.equals(folder._id)) {
|
||||
throw new ApiError(meta.errors.recursiveNesting);
|
||||
} else if (ps.parentId === null) {
|
||||
folder.parentId = null;
|
||||
} else {
|
||||
// Get parent folder
|
||||
|
Reference in New Issue
Block a user