We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63484b8 commit 85a39eeCopy full SHA for 85a39ee
dist/main-site/server/main.js
projects/main-site/src/api/repository/api-key.service.ts
@@ -111,15 +111,16 @@ export class ApiKeyService {
111
return { allowed: true, user: null };
112
}
113
try {
114
+ const fo = key ? Equal(key) : IsNull();
115
const apiKey = await this.findOneOrFail({
116
where: [
117
{
118
ip_domain: ILike(`%${origin}%`),
- api_key: (key === '' || key === null) ? IsNull() : Equal(key)
119
+ api_key: fo
120
},
121
122
ip_domain: Equal('*'),
- api_key: Equal(key)
123
124
125
],
126
relations: ['user_']
0 commit comments