chore(back/AuthToken): update to new AuthProof use method from swaf
This commit is contained in:
parent
c54a201e98
commit
8d13bd0c8d
@ -35,11 +35,9 @@ export default class AuthToken extends Model implements AuthProof<User> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO promote this method to AuthProof interface in swaf and call it on successful authentication
|
||||
*/
|
||||
public use(): void {
|
||||
public async use(): Promise<void> {
|
||||
this.used_at = new Date();
|
||||
await this.save();
|
||||
}
|
||||
|
||||
public canDelete(user_id: number): boolean {
|
||||
|
Loading…
Reference in New Issue
Block a user