summaryrefslogtreecommitdiff
path: root/src/server/api
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-05-21 11:08:08 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-05-21 11:08:08 +0900
commitf8c414aafca8e91017cf01a65c21b57c88783076 (patch)
tree1f1bd6e2ca22cdc37d2b5d253d5b6cdecc6bd41f /src/server/api
parentUpdate .eslintrc (diff)
downloadsharkey-f8c414aafca8e91017cf01a65c21b57c88783076.tar.gz
sharkey-f8c414aafca8e91017cf01a65c21b57c88783076.tar.bz2
sharkey-f8c414aafca8e91017cf01a65c21b57c88783076.zip
#1621
Diffstat (limited to 'src/server/api')
-rw-r--r--src/server/api/endpoints/i/update.ts6
1 files changed, 6 insertions, 0 deletions
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
}
});