From f8c414aafca8e91017cf01a65c21b57c88783076 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 21 May 2018 11:08:08 +0900 Subject: #1621 --- src/server/api/endpoints/i/update.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/server/api/endpoints') diff --git a/src/server/api/endpoints/i/update.ts b/src/server/api/endpoints/i/update.ts index b7b25d0f65..6e0c5b8515 100644 --- a/src/server/api/endpoints/i/update.ts +++ b/src/server/api/endpoints/i/update.ts @@ -47,6 +47,11 @@ module.exports = async (params, user, app) => new Promise(async (res, rej) => { if (isBotErr) return rej('invalid isBot param'); if (isBot != null) user.isBot = isBot; + // Get 'isCat' parameter + const [isCat, isCatErr] = $.bool.optional().get(params.isCat); + if (isCatErr) return rej('invalid isCat param'); + if (isCat != null) user.isCat = isCat; + // Get 'autoWatch' parameter const [autoWatch, autoWatchErr] = $.bool.optional().get(params.autoWatch); if (autoWatchErr) return rej('invalid autoWatch param'); @@ -82,6 +87,7 @@ module.exports = async (params, user, app) => new Promise(async (res, rej) => { bannerColor: user.bannerColor, profile: user.profile, isBot: user.isBot, + isCat: user.isCat, settings: user.settings } }); -- cgit v1.2.3-freya