implement password reset

This commit is contained in:
Hayden 2024-05-24 20:34:49 -05:00
parent 2231c54f21
commit 64d2957853
No known key found for this signature in database
GPG key ID: 17CF79474E257545
5 changed files with 87 additions and 13 deletions

View file

@ -149,3 +149,10 @@ func (r *UserRepository) PasswordResetGet(ctx context.Context, token []byte) (*e
WithUser().
Only(ctx)
}
func (r *UserRepository) PasswordResetDelete(ctx context.Context, token []byte) error {
_, err := r.db.ActionToken.Delete().
Where(actiontoken.Token(token)).
Exec(ctx)
return err
}