mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 18:55:19 -04:00
auth: Remove userName parameter of removeToken function
As suggested by @innaytool Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
f68caab6e8
commit
cc2fcac532
3 changed files with 4 additions and 6 deletions
|
@ -141,10 +141,9 @@ export class AuthService {
|
|||
return user.authTokens;
|
||||
}
|
||||
|
||||
async removeToken(userName: string, keyId: string) {
|
||||
const user = await this.usersService.getUserByUsername(userName);
|
||||
async removeToken(keyId: string) {
|
||||
const token = await this.authTokenRepository.findOne({
|
||||
where: { keyId: keyId, user: user },
|
||||
where: { keyId: keyId },
|
||||
});
|
||||
await this.authTokenRepository.remove(token);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue