mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-25 17:33:09 +02:00
Fix: update_client_setting (#3086)
This commit is contained in:
parent
84db15694d
commit
65bfa3c0d6
1 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ export const meta = {
|
||||||
|
|
||||||
export default define(meta, (ps, user) => new Promise(async (res, rej) => {
|
export default define(meta, (ps, user) => new Promise(async (res, rej) => {
|
||||||
const x: any = {};
|
const x: any = {};
|
||||||
x[`clientSettings.${name}`] = ps.value;
|
x[`clientSettings.${ps.name}`] = ps.value;
|
||||||
|
|
||||||
await User.update(user._id, {
|
await User.update(user._id, {
|
||||||
$set: x
|
$set: x
|
||||||
|
@ -31,7 +31,7 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => {
|
||||||
|
|
||||||
// Publish event
|
// Publish event
|
||||||
publishMainStream(user._id, 'clientSettingUpdated', {
|
publishMainStream(user._id, 'clientSettingUpdated', {
|
||||||
key: name,
|
key: ps.name,
|
||||||
value: ps.value
|
value: ps.value
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in a new issue