diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-02-09 01:37:50 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-02-09 01:37:50 +0900 |
| commit | 7435dfcacf501c456b60e0b2a65f7d1620f2e187 (patch) | |
| tree | 88277a8a07a40b00e10b59a3889e1fd2d8a5ea6c /src/api/endpoints/i | |
| parent | [API] Fix bug (diff) | |
| download | sharkey-7435dfcacf501c456b60e0b2a65f7d1620f2e187.tar.gz sharkey-7435dfcacf501c456b60e0b2a65f7d1620f2e187.tar.bz2 sharkey-7435dfcacf501c456b60e0b2a65f7d1620f2e187.zip | |
[API] Fix bug
Diffstat (limited to 'src/api/endpoints/i')
| -rw-r--r-- | src/api/endpoints/i/update.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/endpoints/i/update.js b/src/api/endpoints/i/update.js index 652006e957..208ece4fa8 100644 --- a/src/api/endpoints/i/update.js +++ b/src/api/endpoints/i/update.js @@ -78,7 +78,9 @@ module.exports = async (params, user, _, isSecure) => user.banner_id = new mongo.ObjectID(banner); } - await User.update(user._id, user); + await User.update(user._id, { + $set: user + }); // Serialize const iObj = await serialize(user, user, { |