logging improvements {for operational reasons} (#50)

This commit is contained in:
Michael Quigley 2022-09-20 16:38:20 -04:00
parent 9cf3cf6f05
commit 4b77fa785b
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
2 changed files with 4 additions and 2 deletions

View File

@ -68,5 +68,7 @@ func (self *createAccountHandler) Handle(params identity.CreateAccountParams) mi
return identity.NewCreateAccountInternalServerError().WithPayload(rest_model_zrok.ErrorMessage(err.Error()))
}
logrus.Infof("account request for '%v' has registration token '%v'", params.Body.Email, ar.Token)
return identity.NewCreateAccountCreated()
}

View File

@ -17,7 +17,7 @@ func newVerifyHandler(cfg *Config) *verifyHandler {
func (self *verifyHandler) Handle(params identity.VerifyParams) middleware.Responder {
if params.Body != nil {
logrus.Infof("received verify request for token '%v'", params.Body.Token)
logrus.Debugf("received verify request for token '%v'", params.Body.Token)
tx, err := str.Begin()
if err != nil {
logrus.Errorf("error starting transaction: %v", err)
@ -30,7 +30,7 @@ func (self *verifyHandler) Handle(params identity.VerifyParams) middleware.Respo
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")