soft delete support for account_requests (#262)

This commit is contained in:
Michael Quigley
2023-03-09 15:29:15 -05:00
parent 47fe0f546a
commit 9da1137a78
4 changed files with 14 additions and 6 deletions

View File

@ -26,7 +26,11 @@ func (self *verifyHandler) Handle(params account.VerifyParams) middleware.Respon
ar, err := str.FindAccountRequestWithToken(params.Body.Token, tx)
if err != nil {
logrus.Errorf("error finding account with token '%v': %v", params.Body.Token, err)
logrus.Errorf("error finding account request with token '%v': %v", params.Body.Token, err)
return account.NewVerifyNotFound()
}
if ar.Deleted {
logrus.Errorf("account request for '%v' with token '%v' deleted", ar.Email, params.Body.Token)
return account.NewVerifyNotFound()
}