Skip to content

Commit 85a332a

Browse files
committed
fix: handle apikey error
1 parent da4b27f commit 85a332a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ class CoCreateLazyLoader {
135135

136136
async getApiKey(organization_id, name) {
137137
let organization = await this.crud.getOrganization(organization_id, false);
138-
if (!organization.error)
138+
if (organization.error)
139139
return organization.error
140-
else if (!organization.apis)
140+
if (!organization.apis)
141141
return { error: 'Missing apis object in organization object' }
142142
if (!organization.apis[name])
143143
return { error: `Missing ${name} in organization apis object` }

0 commit comments

Comments
 (0)