chore(back/AuthToken): update to new AuthProof use method from swaf

This commit is contained in:
Alice Gaudon 2022-03-06 16:39:27 +01:00
parent c54a201e98
commit 8d13bd0c8d

View File

@ -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 {