mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-26 11:43:59 -05: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
e04fcb9ee9
commit
b589dedd2a
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