diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-02-09 02:20:47 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-02-09 02:20:47 +0900 |
| commit | 6026ef6d71d2b2d7792b95fd53e9e767657ac337 (patch) | |
| tree | fe671c15c93644ac4d68d8e72f9d2306a2ef1418 /src | |
| parent | [API] Fix bug (diff) | |
| download | sharkey-6026ef6d71d2b2d7792b95fd53e9e767657ac337.tar.gz sharkey-6026ef6d71d2b2d7792b95fd53e9e767657ac337.tar.bz2 sharkey-6026ef6d71d2b2d7792b95fd53e9e767657ac337.zip | |
[API] Fix bug
Diffstat (limited to 'src')
| -rw-r--r-- | src/api/endpoints/drive/files/update.js | 5 | ||||
| -rw-r--r-- | src/api/endpoints/drive/folders/update.js | 5 | ||||
| -rw-r--r-- | src/api/endpoints/i/update.js | 9 |
3 files changed, 16 insertions, 3 deletions
diff --git a/src/api/endpoints/drive/files/update.js b/src/api/endpoints/drive/files/update.js index aea3c32c39..3ec9e5a73d 100644 --- a/src/api/endpoints/drive/files/update.js +++ b/src/api/endpoints/drive/files/update.js @@ -77,7 +77,10 @@ module.exports = (params, user) => } DriveFile.update(file._id, { - $set: file + $set: { + name: file.name, + folder_id: file.folder_id + } }); // Serialize diff --git a/src/api/endpoints/drive/folders/update.js b/src/api/endpoints/drive/folders/update.js index 3117213877..d04173158d 100644 --- a/src/api/endpoints/drive/folders/update.js +++ b/src/api/endpoints/drive/folders/update.js @@ -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 diff --git a/src/api/endpoints/i/update.js b/src/api/endpoints/i/update.js index 208ece4fa8..13b5c523e0 100644 --- a/src/api/endpoints/i/update.js +++ b/src/api/endpoints/i/update.js @@ -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 |