diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-04-29 17:17:15 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-04-29 17:17:15 +0900 |
| commit | 372bfaceda5bf694bf33986b5a64a56e5787104c (patch) | |
| tree | c498cd9fac2f79404e2d5b74549a5d759257ddcf /src/server | |
| parent | Merge pull request #1559 from syuilo/visibility (diff) | |
| download | sharkey-372bfaceda5bf694bf33986b5a64a56e5787104c.tar.gz sharkey-372bfaceda5bf694bf33986b5a64a56e5787104c.tar.bz2 sharkey-372bfaceda5bf694bf33986b5a64a56e5787104c.zip | |
リファクタリングなど
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/api/endpoints/i/update_client_setting.ts | 17 | ||||
| -rw-r--r-- | src/server/index.ts | 6 |
2 files changed, 9 insertions, 14 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 + }); }); diff --git a/src/server/index.ts b/src/server/index.ts index 594f40c22f..4c5aab9a22 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -26,9 +26,9 @@ if (process.env.NODE_ENV != 'production') { app.use(logger()); // Delay - app.use(slow({ - delay: 1000 - })); + //app.use(slow({ + // delay: 1000 + //})); } // Compress response |