fix lint
This commit is contained in:
@ -21,22 +21,22 @@ export const meta = {
|
||||
|
||||
parentId: {
|
||||
validator: $.optional.nullable.type(ID),
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchFolder: {
|
||||
message: 'No such folder.',
|
||||
code: 'NO_SUCH_FOLDER',
|
||||
id: '53326628-a00d-40a6-a3cd-8975105c0f95'
|
||||
id: '53326628-a00d-40a6-a3cd-8975105c0f95',
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'object' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
ref: 'DriveFolder'
|
||||
}
|
||||
ref: 'DriveFolder',
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
@ -46,7 +46,7 @@ export default define(meta, async (ps, user) => {
|
||||
// Fetch parent folder
|
||||
parent = await DriveFolders.findOne({
|
||||
id: ps.parentId,
|
||||
userId: user.id
|
||||
userId: user.id,
|
||||
});
|
||||
|
||||
if (parent == null) {
|
||||
@ -60,7 +60,7 @@ export default define(meta, async (ps, user) => {
|
||||
createdAt: new Date(),
|
||||
name: ps.name,
|
||||
parentId: parent !== null ? parent.id : null,
|
||||
userId: user.id
|
||||
userId: user.id,
|
||||
}).then(x => DriveFolders.findOneOrFail(x.identifiers[0]));
|
||||
|
||||
const folderObj = await DriveFolders.pack(folder);
|
||||
|
Reference in New Issue
Block a user