mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 03:53:08 +02:00
[API] Fix bug
This commit is contained in:
parent
3fd2a68a45
commit
6026ef6d71
3 changed files with 16 additions and 3 deletions
|
@ -77,7 +77,10 @@ module.exports = (params, user) =>
|
|||
}
|
||||
|
||||
DriveFile.update(file._id, {
|
||||
$set: file
|
||||
$set: {
|
||||
name: file.name,
|
||||
folder_id: file.folder_id
|
||||
}
|
||||
});
|
||||
|
||||
// Serialize
|
||||
|
|
|
@ -100,7 +100,10 @@ module.exports = (params, user) =>
|
|||
|
||||
// Update
|
||||
DriveFolder.update(folder._id, {
|
||||
$set: folder
|
||||
$set: {
|
||||
name: folder.name,
|
||||
parent_id: folder.parent_id
|
||||
}
|
||||
});
|
||||
|
||||
// Serialize
|
||||
|
|
|
@ -79,7 +79,14 @@ module.exports = async (params, user, _, isSecure) =>
|
|||
}
|
||||
|
||||
await User.update(user._id, {
|
||||
$set: user
|
||||
$set: {
|
||||
name: user.name,
|
||||
location: user.location,
|
||||
bio: user.bio,
|
||||
birthday: user.birthday,
|
||||
avatar_id: user.avatar_id,
|
||||
banner_id: user.banner_id
|
||||
}
|
||||
});
|
||||
|
||||
// Serialize
|
||||
|
|
Loading…
Reference in a new issue