mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-17 08:34:54 -04:00
ESLint: Enable @typescript-eslint/return-await rule
This ensures stack traces are helpful at the cost of a slightly lower performance (one more tick in the event loop). Fixes #838 Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
2ba824d9e2
commit
9485597e6f
8 changed files with 26 additions and 20 deletions
|
@ -44,12 +44,16 @@ export class TokensController {
|
|||
@Body('validUntil') validUntil: TimestampMillis,
|
||||
): Promise<AuthTokenWithSecretDto> {
|
||||
// ToDo: Get real userName
|
||||
return this.authService.createTokenForUser('hardcoded', label, validUntil);
|
||||
return await this.authService.createTokenForUser(
|
||||
'hardcoded',
|
||||
label,
|
||||
validUntil,
|
||||
);
|
||||
}
|
||||
|
||||
@Delete('/:keyId')
|
||||
@HttpCode(204)
|
||||
async deleteToken(@Param('keyId') keyId: string) {
|
||||
return this.authService.removeToken(keyId);
|
||||
return await this.authService.removeToken(keyId);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue