diff --git a/src/routers/funcs.go b/src/routers/funcs.go index 4524661..dac7313 100644 --- a/src/routers/funcs.go +++ b/src/routers/funcs.go @@ -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) })