diff options
| author | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2017-04-14 20:45:37 +0900 |
|---|---|---|
| committer | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2017-04-14 20:45:37 +0900 |
| commit | b095efaee59572800244b34564692fd999cc4ded (patch) | |
| tree | 89a2a1401b2af797bb687d0d79cfb5e9e52d987e /src/api/endpoints/i/appdata/set.ts | |
| parent | Fix tslint.json (diff) | |
| download | sharkey-b095efaee59572800244b34564692fd999cc4ded.tar.gz sharkey-b095efaee59572800244b34564692fd999cc4ded.tar.bz2 sharkey-b095efaee59572800244b34564692fd999cc4ded.zip | |
Migrate to tslint 5.1.0
Diffstat (limited to 'src/api/endpoints/i/appdata/set.ts')
| -rw-r--r-- | src/api/endpoints/i/appdata/set.ts | 12 |
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); } |