mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-01-11 02:54:14 +00:00
private: adds tokens controller
adds private api adds AuthTokenDto and AuthTokenWithSecretDto adds necessary methods in the users service adds RandomnessError Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
a4522d7230
commit
025f24122c
1 changed files with 3 additions and 1 deletions
|
@ -36,7 +36,9 @@ export class TokensController {
|
|||
}
|
||||
|
||||
@Post()
|
||||
async postToken(@Body() label: string): Promise<AuthTokenWithSecretDto> {
|
||||
async postTokenRequest(
|
||||
@Body() label: string,
|
||||
): Promise<AuthTokenWithSecretDto> {
|
||||
// ToDo: Get real userName
|
||||
const authToken = await this.usersService.createTokenForUser(
|
||||
'hardcoded',
|
||||
|
|
Loading…
Reference in a new issue