mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 18:55:19 -04:00
refactor(auth-token): lazy-load relations
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
6a56599c8a
commit
552d06f182
3 changed files with 15 additions and 11 deletions
|
@ -53,7 +53,11 @@ export class AuthService {
|
|||
}
|
||||
const accessToken = await this.getAuthTokenAndValidate(keyId, secret);
|
||||
await this.setLastUsedToken(keyId);
|
||||
return await this.usersService.getUserByUsername(accessToken.user.username);
|
||||
return await this.usersService.getUserByUsername(
|
||||
(
|
||||
await accessToken.user
|
||||
).username,
|
||||
);
|
||||
}
|
||||
|
||||
async createTokenForUser(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue