summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-29 17:17:15 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-29 17:17:15 +0900
commit372bfaceda5bf694bf33986b5a64a56e5787104c (patch)
treec498cd9fac2f79404e2d5b74549a5d759257ddcf /src/server/api/endpoints
parentMerge pull request #1559 from syuilo/visibility (diff)
downloadsharkey-372bfaceda5bf694bf33986b5a64a56e5787104c.tar.gz
sharkey-372bfaceda5bf694bf33986b5a64a56e5787104c.tar.bz2
sharkey-372bfaceda5bf694bf33986b5a64a56e5787104c.zip
リファクタリングなど
Diffstat (limited to 'src/server/api/endpoints')
-rw-r--r--src/server/api/endpoints/i/update_client_setting.ts17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/server/api/endpoints/i/update_client_setting.ts b/src/server/api/endpoints/i/update_client_setting.ts
index 2edc2104d2..278eb1cbeb 100644
--- a/src/server/api/endpoints/i/update_client_setting.ts
+++ b/src/server/api/endpoints/i/update_client_setting.ts
@@ -24,16 +24,11 @@ module.exports = async (params, user) => new Promise(async (res, rej) => {
$set: x
});
- // Serialize
- user.clientSettings[name] = value;
- const iObj = await pack(user, user, {
- detail: true,
- includeSecrets: true
- });
-
- // Send response
- res(iObj);
+ res();
- // Publish i updated event
- event(user._id, 'i_updated', iObj);
+ // Publish event
+ event(user._id, 'clientSettingUpdated', {
+ key: name,
+ value
+ });
});