diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-03-03 20:28:42 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-03-03 20:28:42 +0900 |
| commit | 3a58cff9b2b49c103b1d51a951ec269a8929d6df (patch) | |
| tree | e311e00483751c7e6ff161a79cea4f94bcd49797 /src/api/endpoints/app | |
| parent | [API] Fix bug (diff) | |
| download | sharkey-3a58cff9b2b49c103b1d51a951ec269a8929d6df.tar.gz sharkey-3a58cff9b2b49c103b1d51a951ec269a8929d6df.tar.bz2 sharkey-3a58cff9b2b49c103b1d51a951ec269a8929d6df.zip | |
[API] Fix bug
Diffstat (limited to 'src/api/endpoints/app')
| -rw-r--r-- | src/api/endpoints/app/show.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/endpoints/app/show.ts b/src/api/endpoints/app/show.ts index cfb03bb9e5..6b6e4f010c 100644 --- a/src/api/endpoints/app/show.ts +++ b/src/api/endpoints/app/show.ts @@ -57,12 +57,12 @@ module.exports = (params, user, _, isSecure) => const [nameId, nameIdErr] = it(params.name_id, 'string'); if (nameIdErr) return rej('invalid name_id param'); - if (appId === null && nameId === null) { + if (appId === undefined && nameId === undefined) { return rej('app_id or name_id is required'); } // Lookup app - const app = appId !== null + const app = appId !== undefined ? await App.findOne({ _id: appId }) : await App.findOne({ name_id_lower: nameId.toLowerCase() }); |