mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-23 15:25:11 +00:00
[API] Fix bug
This commit is contained in:
parent
12811d6056
commit
7435dfcacf
3 changed files with 9 additions and 3 deletions
|
@ -76,7 +76,9 @@ module.exports = (params, user) =>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DriveFile.update(file._id, file);
|
DriveFile.update(file._id, {
|
||||||
|
$set: file
|
||||||
|
});
|
||||||
|
|
||||||
// Serialize
|
// Serialize
|
||||||
const fileObj = await serialize(file);
|
const fileObj = await serialize(file);
|
||||||
|
|
|
@ -99,7 +99,9 @@ module.exports = (params, user) =>
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update
|
// Update
|
||||||
DriveFolder.update(folder._id, folder);
|
DriveFolder.update(folder._id, {
|
||||||
|
$set: folder
|
||||||
|
});
|
||||||
|
|
||||||
// Serialize
|
// Serialize
|
||||||
const folderObj = await serialize(folder);
|
const folderObj = await serialize(folder);
|
||||||
|
|
|
@ -78,7 +78,9 @@ module.exports = async (params, user, _, isSecure) =>
|
||||||
user.banner_id = new mongo.ObjectID(banner);
|
user.banner_id = new mongo.ObjectID(banner);
|
||||||
}
|
}
|
||||||
|
|
||||||
await User.update(user._id, user);
|
await User.update(user._id, {
|
||||||
|
$set: user
|
||||||
|
});
|
||||||
|
|
||||||
// Serialize
|
// Serialize
|
||||||
const iObj = await serialize(user, user, {
|
const iObj = await serialize(user, user, {
|
||||||
|
|
Loading…
Reference in a new issue