updated msg in funcs.go after IP POST
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Paul 2022-02-22 14:44:52 +01:00
parent eb63a8dd07
commit 878239d5d5

View File

@ -29,7 +29,7 @@ func RegisterRoutes(e *echo.Echo, ctx *context.Context, cfg *config.Config) {
})
e.POST("/ip", func(c echo.Context) (err error) {
var ip = new(models.IP)
var msg string
var msg = "No IP inserted"
err = c.Bind(ip)
if err != nil {
return Result(c, fmt.Errorf("error when parsing body"), "")
@ -41,8 +41,6 @@ func RegisterRoutes(e *echo.Echo, ctx *context.Context, cfg *config.Config) {
}
if num > 0 {
msg = fmt.Sprintf("Inserted %d IP", num)
} else {
msg = "No IP inserted"
}
return Result(c, err, msg)
})