diff --git a/src/models/AuthToken.ts b/src/models/AuthToken.ts index f0d78ca..6826198 100644 --- a/src/models/AuthToken.ts +++ b/src/models/AuthToken.ts @@ -35,11 +35,9 @@ export default class AuthToken extends Model implements AuthProof { } } - /** - * TODO promote this method to AuthProof interface in swaf and call it on successful authentication - */ - public use(): void { + public async use(): Promise { this.used_at = new Date(); + await this.save(); } public canDelete(user_id: number): boolean {