From 19b9cb105d49e2a00ae19e3dc1f2d36dc394f148 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Mon, 26 Mar 2018 00:19:07 +0900 Subject: Introduce account document to user document An account document is attached to a user document if an account of the user is on the server. It may be missing if the user is on a remote server. --- src/api/endpoints/i/update_client_setting.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/api/endpoints/i/update_client_setting.ts') diff --git a/src/api/endpoints/i/update_client_setting.ts b/src/api/endpoints/i/update_client_setting.ts index b817ff354c..c772ed5dc3 100644 --- a/src/api/endpoints/i/update_client_setting.ts +++ b/src/api/endpoints/i/update_client_setting.ts @@ -22,14 +22,14 @@ module.exports = async (params, user) => new Promise(async (res, rej) => { if (valueErr) return rej('invalid value param'); const x = {}; - x[`client_settings.${name}`] = value; + x[`account.client_settings.${name}`] = value; await User.update(user._id, { $set: x }); // Serialize - user.client_settings[name] = value; + user.account.client_settings[name] = value; const iObj = await pack(user, user, { detail: true, includeSecrets: true -- cgit v1.2.3-freya