mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 18:55:19 -04:00
Fix various ESLint errors in services
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
4d94739a9f
commit
1cc86a728a
4 changed files with 11 additions and 6 deletions
|
@ -117,7 +117,9 @@ export class AuthService {
|
|||
new Date(validUntil),
|
||||
);
|
||||
}
|
||||
const createdToken = await this.authTokenRepository.save(token);
|
||||
const createdToken = (await this.authTokenRepository.save(
|
||||
token,
|
||||
)) as AuthToken;
|
||||
return this.toAuthTokenWithSecretDto(createdToken, `${keyId}.${secret}`);
|
||||
}
|
||||
|
||||
|
@ -150,7 +152,7 @@ export class AuthService {
|
|||
) {
|
||||
// tokens validUntil Date lies in the past
|
||||
throw new TokenNotValidError(
|
||||
`AuthToken '${token}' is not valid since ${accessToken.validUntil}.`,
|
||||
`AuthToken '${token}' is not valid since ${accessToken.validUntil.toISOString()}.`,
|
||||
);
|
||||
}
|
||||
return accessToken;
|
||||
|
@ -173,7 +175,10 @@ export class AuthService {
|
|||
|
||||
toAuthTokenDto(authToken: AuthToken): AuthTokenDto | null {
|
||||
if (!authToken) {
|
||||
this.logger.warn(`Recieved ${authToken} argument!`, 'toAuthTokenDto');
|
||||
this.logger.warn(
|
||||
`Recieved ${String(authToken)} argument!`,
|
||||
'toAuthTokenDto',
|
||||
);
|
||||
return null;
|
||||
}
|
||||
const tokenDto: AuthTokenDto = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue