[API] Fix bugs
This commit is contained in:
parent
88e5a18509
commit
e31eec542f
5 changed files with 5 additions and 15 deletions
|
|
@ -59,15 +59,13 @@ module.exports = (params, user) =>
|
|||
}
|
||||
|
||||
// Create folder
|
||||
const inserted = await DriveFolder.insert({
|
||||
const folder = await DriveFolder.insert({
|
||||
created_at: new Date(),
|
||||
name: name,
|
||||
parent_id: parent !== null ? parent._id : null,
|
||||
user_id: user._id
|
||||
});
|
||||
|
||||
const folder = inserted.ops[0];
|
||||
|
||||
// Serialize
|
||||
const folderObj = await serialize(folder);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue