AuthTokenDto: Make properties consistently optional

validUntil and lastUsed already have a IsOptional decorator,
this makes the properties themselves also optional

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-04-29 15:55:11 +02:00
parent ef8b8d985e
commit 5ee9b2a7e8
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
3 changed files with 4 additions and 6 deletions

View file

@ -251,7 +251,7 @@ describe('AuthService', () => {
});
jest.spyOn(authTokenRepo, 'save').mockImplementationOnce(
async (authTokenSaved: AuthToken, _): Promise<AuthToken> => {
expect(authTokenSaved.lastUsed).toBeUndefined();
expect(authTokenSaved.lastUsed).toBeNull();
return authTokenSaved;
},
);
@ -275,7 +275,7 @@ describe('AuthService', () => {
});
jest.spyOn(authTokenRepo, 'save').mockImplementationOnce(
async (authTokenSaved: AuthToken, _): Promise<AuthToken> => {
expect(authTokenSaved.lastUsed).toBeUndefined();
expect(authTokenSaved.lastUsed).toBeNull();
return authTokenSaved;
},
);