Skip to content

Commit 85a39ee

Browse files
committed
✔ Fixed ~
1 parent 63484b8 commit 85a39ee

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

dist/main-site/server/main.js

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

projects/main-site/src/api/repository/api-key.service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,16 @@ export class ApiKeyService {
111111
return { allowed: true, user: null };
112112
}
113113
try {
114+
const fo = key ? Equal(key) : IsNull();
114115
const apiKey = await this.findOneOrFail({
115116
where: [
116117
{
117118
ip_domain: ILike(`%${origin}%`),
118-
api_key: (key === '' || key === null) ? IsNull() : Equal(key)
119+
api_key: fo
119120
},
120121
{
121122
ip_domain: Equal('*'),
122-
api_key: Equal(key)
123+
api_key: fo
123124
}
124125
],
125126
relations: ['user_']

0 commit comments

Comments
 (0)