From 65bfa3c0d69fd87a6fcbcc21760c9da821844d7e Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 4 Nov 2018 03:33:37 +0900 Subject: [PATCH] Fix: update_client_setting (#3086) --- src/server/api/endpoints/i/update_client_setting.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/api/endpoints/i/update_client_setting.ts b/src/server/api/endpoints/i/update_client_setting.ts index 03eb23a5a2..66435ec9b2 100644 --- a/src/server/api/endpoints/i/update_client_setting.ts +++ b/src/server/api/endpoints/i/update_client_setting.ts @@ -21,7 +21,7 @@ export const meta = { export default define(meta, (ps, user) => new Promise(async (res, rej) => { const x: any = {}; - x[`clientSettings.${name}`] = ps.value; + x[`clientSettings.${ps.name}`] = ps.value; await User.update(user._id, { $set: x @@ -31,7 +31,7 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => { // Publish event publishMainStream(user._id, 'clientSettingUpdated', { - key: name, + key: ps.name, value: ps.value }); }));