mirror of
https://github.com/openziti/zrok.git
synced 2024-11-07 08:44:14 +01:00
missing deferred rollback (#50)
This commit is contained in:
parent
27d1f390a5
commit
5fae000dad
@ -23,11 +23,14 @@ func (self *verifyHandler) Handle(params identity.VerifyParams) middleware.Respo
|
||||
logrus.Errorf("error starting transaction: %v", err)
|
||||
return identity.NewVerifyInternalServerError().WithPayload(rest_model_zrok.ErrorMessage(err.Error()))
|
||||
}
|
||||
defer func() { _ = tx.Rollback() }()
|
||||
|
||||
ar, err := str.FindAccountRequestWithToken(params.Body.Token, tx)
|
||||
if err != nil {
|
||||
logrus.Errorf("error finding account with token '%v': %v", params.Body.Token, err)
|
||||
return identity.NewVerifyNotFound()
|
||||
}
|
||||
|
||||
return identity.NewVerifyOK().WithPayload(&rest_model_zrok.VerifyResponse{Email: ar.Email})
|
||||
} else {
|
||||
logrus.Error("empty verification request")
|
||||
|
Loading…
Reference in New Issue
Block a user