mirror of
https://codeberg.org/pluja/kycnot.me
synced 2025-01-07 13:17:57 -05:00
use error logs
This commit is contained in:
parent
9f561e0702
commit
192fccb443
@ -276,26 +276,26 @@ func (s *Server) handlePostRequestServiceForm(c iris.Context) {
|
||||
log.Debug().Msg("Handling request service form")
|
||||
var data RequestFormData
|
||||
if err := c.ReadForm(&data); err != nil {
|
||||
log.Debug().Err(err).Msg("Could not parse form data")
|
||||
log.Error().Err(err).Msg("Could not parse form data")
|
||||
c.Redirect("/request/service?error=Invalid%20Form", iris.StatusSeeOther)
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("Nonce: %v, ID: %v", data.PowNonce, data.PowId)
|
||||
if !s.PowChallenger.PowVerifyProof(data.PowId, data.PowNonce) {
|
||||
log.Debug().Msg("Invalid PoW")
|
||||
log.Error().Msg("Invalid PoW")
|
||||
c.Redirect("/request/service?error=Invalid%20Captcha", iris.StatusSeeOther)
|
||||
return
|
||||
}
|
||||
|
||||
if data.KYCLevel < 0 || data.KYCLevel >= 4 {
|
||||
log.Debug().Msgf("Invalid KYC Level value: %v", c.FormValue("kyc_level"))
|
||||
log.Error().Msgf("Invalid KYC Level value: %v", c.FormValue("kyc_level"))
|
||||
c.Redirect("/request/service?error=Invalid%20KYC%20Level", iris.StatusSeeOther)
|
||||
return
|
||||
}
|
||||
|
||||
if len(data.Attributes) < 3 {
|
||||
log.Debug().Msgf("Invalid number of attributes: %v", len(data.Attributes))
|
||||
log.Error().Msgf("Invalid number of attributes: %v", len(data.Attributes))
|
||||
c.Redirect("/request/service?error=You%20must%20select%20at%20least%203%20attributes", iris.StatusSeeOther)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user