summaryrefslogtreecommitdiff
path: root/src/api/endpoints/i
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-09 01:37:50 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-09 01:37:50 +0900
commit7435dfcacf501c456b60e0b2a65f7d1620f2e187 (patch)
tree88277a8a07a40b00e10b59a3889e1fd2d8a5ea6c /src/api/endpoints/i
parent[API] Fix bug (diff)
downloadsharkey-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.js4
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, {