updated msg in funcs.go after IP POST
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
eb63a8dd07
commit
878239d5d5
@ -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)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user