private: Add until to token creation

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-01-21 12:33:45 +01:00 committed by David Mehren
parent 324ba71d24
commit 4784a1aea2
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
3 changed files with 20 additions and 8 deletions

View file

@ -37,12 +37,14 @@ export class TokensController {
@Post()
async postTokenRequest(
@Body() label: string,
@Body('label') label: string,
@Body('until') until: number,
): Promise<AuthTokenWithSecretDto> {
// ToDo: Get real userName
const authToken = await this.usersService.createTokenForUser(
'hardcoded',
label,
until,
);
return this.usersService.toAuthTokenWithSecretDto(authToken);
}