mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-22 11:15:23 -04:00
Ensure optional properties of AuthTokenDto are initialized
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
f0c4fbe371
commit
ea11fbff12
2 changed files with 3 additions and 0 deletions
|
@ -64,6 +64,7 @@ export class AuthToken {
|
||||||
newToken.accessTokenHash = accessToken;
|
newToken.accessTokenHash = accessToken;
|
||||||
newToken.createdAt = new Date();
|
newToken.createdAt = new Date();
|
||||||
newToken.validUntil = validUntil;
|
newToken.validUntil = validUntil;
|
||||||
|
newToken.lastUsed = null;
|
||||||
return newToken;
|
return newToken;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,6 +184,8 @@ export class AuthService {
|
||||||
label: authToken.label,
|
label: authToken.label,
|
||||||
keyId: authToken.keyId,
|
keyId: authToken.keyId,
|
||||||
createdAt: authToken.createdAt,
|
createdAt: authToken.createdAt,
|
||||||
|
validUntil: null,
|
||||||
|
lastUsed: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (authToken.validUntil) {
|
if (authToken.validUntil) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue