From 7435dfcacf501c456b60e0b2a65f7d1620f2e187 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 9 Feb 2017 01:37:50 +0900 Subject: [API] Fix bug --- src/api/endpoints/i/update.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/api/endpoints/i') 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, { -- cgit v1.2.3-freya