mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 07:04:45 -04:00
private: Add until to token creation
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
324ba71d24
commit
4784a1aea2
3 changed files with 20 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue