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> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public async use(): Promise<void> {
|
||||||
* TODO promote this method to AuthProof interface in swaf and call it on successful authentication
|
|
||||||
*/
|
|
||||||
public use(): void {
|
|
||||||
this.used_at = new Date();
|
this.used_at = new Date();
|
||||||
|
await this.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public canDelete(user_id: number): boolean {
|
public canDelete(user_id: number): boolean {
|
||||||
|
Loading…
Reference in New Issue
Block a user