summaryrefslogtreecommitdiff
path: root/src/api/endpoints/i/appdata/set.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-10-07 03:36:46 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-10-07 03:36:46 +0900
commit6a5c6280ffd3ffe820beb23294f1c2c1f5deb9cf (patch)
treeeb9006394a36bfa80bd255e9d86a524060c37828 /src/api/endpoints/i/appdata/set.ts
parentMerge pull request #817 from syuilo/greenkeeper/@types/mongodb-2.2.13 (diff)
downloadsharkey-6a5c6280ffd3ffe820beb23294f1c2c1f5deb9cf.tar.gz
sharkey-6a5c6280ffd3ffe820beb23294f1c2c1f5deb9cf.tar.bz2
sharkey-6a5c6280ffd3ffe820beb23294f1c2c1f5deb9cf.zip
:v:
Diffstat (limited to 'src/api/endpoints/i/appdata/set.ts')
-rw-r--r--src/api/endpoints/i/appdata/set.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/endpoints/i/appdata/set.ts b/src/api/endpoints/i/appdata/set.ts
index 24f192de6b..9c3dbe185b 100644
--- a/src/api/endpoints/i/appdata/set.ts
+++ b/src/api/endpoints/i/appdata/set.ts
@@ -21,7 +21,7 @@ module.exports = (params, user, app, isSecure) => new Promise(async (res, rej) =
const [data, dataError] = $(params.data).optional.object()
.pipe(obj => {
const hasInvalidData = Object.entries(obj).some(([k, v]) =>
- $(k).string().match(/^[a-z_]+$/).isNg() && $(v).string().isNg());
+ $(k).string().match(/^[a-z_]+$/).nok() && $(v).string().nok());
return !hasInvalidData;
}).$;
if (dataError) return rej('invalid data param');