mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 18:55:19 -04:00
AuthTokenEntity: Make validUntil not nullable
As all tokens are valid for a maximum of 2 years, the validUntil attribute is always populated. This updates the database schema and the DTO to reflect that. Fixes #1256 Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
f4587cfa9b
commit
0d9dfc4076
4 changed files with 8 additions and 13 deletions
|
@ -184,14 +184,10 @@ export class AuthService {
|
|||
label: authToken.label,
|
||||
keyId: authToken.keyId,
|
||||
createdAt: authToken.createdAt,
|
||||
validUntil: null,
|
||||
validUntil: authToken.validUntil,
|
||||
lastUsed: null,
|
||||
};
|
||||
|
||||
if (authToken.validUntil) {
|
||||
tokenDto.validUntil = new Date(authToken.validUntil);
|
||||
}
|
||||
|
||||
if (authToken.lastUsed) {
|
||||
tokenDto.lastUsed = new Date(authToken.lastUsed);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue