From 21ebc5e84e82198c3b1757272e50b675a0d24239 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 2 Mar 2018 07:01:47 +0900 Subject: [PATCH] oops --- src/api/endpoints/i/update.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/endpoints/i/update.ts b/src/api/endpoints/i/update.ts index fc12665ad..2a5dce64a 100644 --- a/src/api/endpoints/i/update.ts +++ b/src/api/endpoints/i/update.ts @@ -49,7 +49,7 @@ module.exports = async (params, user, _, isSecure) => new Promise(async (res, re // Get 'is_bot' parameter const [isBot, isBotErr] = $(params.is_bot).optional.boolean().$; if (isBotErr) return rej('invalid is_bot param'); - if (isBot) user.is_bot = isBot; + if (isBot != null) user.is_bot = isBot; await User.update(user._id, { $set: {