update on log printing
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Paul 2022-01-30 18:54:01 +01:00
parent d56c89ec2f
commit fb45356a08

View File

@ -33,11 +33,11 @@ func RegisterRoutes(e *echo.Echo, ctx *context.Context, cfg *config.Config) {
var msg string
err = c.Bind(ip)
if err != nil {
return JSONResult(c, fmt.Errorf("Error when parsing body"), "")
return JSONResult(c, fmt.Errorf("error when parsing body"), "")
}
num, err := ip.InsertIP(cfg)
if err != nil {
return JSONResult(c, fmt.Errorf("Error inserting data"), "")
return JSONResult(c, fmt.Errorf("error inserting data"), "")
}
if num > 0 {
msg = fmt.Sprintf("Inserted %d IP", num)