mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-26 11:43:59 -05:00
AuthService: Remove null from toAuthTokenDto return type
toAuthTokenDto won't return null, as TS's strict mode prevents authToken from being nullish Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
d87980ae6d
commit
dcc09747d2
1 changed files with 1 additions and 8 deletions
|
@ -173,14 +173,7 @@ export class AuthService {
|
||||||
await this.authTokenRepository.remove(token);
|
await this.authTokenRepository.remove(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
toAuthTokenDto(authToken: AuthToken): AuthTokenDto | null {
|
toAuthTokenDto(authToken: AuthToken): AuthTokenDto {
|
||||||
if (!authToken) {
|
|
||||||
this.logger.warn(
|
|
||||||
`Recieved ${String(authToken)} argument!`,
|
|
||||||
'toAuthTokenDto',
|
|
||||||
);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
const tokenDto: AuthTokenDto = {
|
const tokenDto: AuthTokenDto = {
|
||||||
lastUsed: null,
|
lastUsed: null,
|
||||||
validUntil: null,
|
validUntil: null,
|
||||||
|
|
Loading…
Reference in a new issue