mirror of
https://github.com/unraid/api.git
synced 2026-01-02 22:50:02 -06:00
fix: unneeded await on api-key service
This commit is contained in:
@@ -125,7 +125,7 @@ export class ApiKeyService implements OnModuleInit {
|
|||||||
throw new GraphQLError('Invalid role specified');
|
throw new GraphQLError('Invalid role specified');
|
||||||
}
|
}
|
||||||
|
|
||||||
const existingKey = await this.findByField('name', sanitizedName);
|
const existingKey = this.findByField('name', sanitizedName);
|
||||||
if (!overwrite && existingKey) {
|
if (!overwrite && existingKey) {
|
||||||
throw new GraphQLError('API key name already exists, use overwrite flag to update');
|
throw new GraphQLError('API key name already exists, use overwrite flag to update');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user