summaryrefslogtreecommitdiff
path: root/src/api/endpoints/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/endpoints/app')
-rw-r--r--src/api/endpoints/app/show.ts4
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() });