summaryrefslogtreecommitdiff
path: root/src/api/endpoints/i/appdata/set.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/endpoints/i/appdata/set.ts')
-rw-r--r--src/api/endpoints/i/appdata/set.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/api/endpoints/i/appdata/set.ts b/src/api/endpoints/i/appdata/set.ts
index eea17fd0d8..07178d6507 100644
--- a/src/api/endpoints/i/appdata/set.ts
+++ b/src/api/endpoints/i/appdata/set.ts
@@ -37,10 +37,10 @@ module.exports = (params, user, app, isSecure) => new Promise(async (res, rej) =
let set = {};
if (data) {
Object.entries(data).forEach(([k, v]) => {
- set['data.' + k] = v;
+ set[`data.${k}`] = v;
});
} else {
- set['data.' + key] = value;
+ set[`data.${key}`] = value;
}
if (isSecure) {
@@ -63,10 +63,10 @@ module.exports = (params, user, app, isSecure) => new Promise(async (res, rej) =
app_id: app._id,
user_id: user._id
}, {
- $set: set
- }), {
- upsert: true
- });
+ $set: set
+ }), {
+ upsert: true
+ });
res(204);
}