From c362158dfb8c661f9d5cc8481044a66acaf1dabd Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sun, 10 Apr 2022 12:46:39 +0200 Subject: [PATCH] updated ipbl --- src/models/ip.go | 3 ++- src/routers/funcs.go | 9 --------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/models/ip.go b/src/models/ip.go index a14f687..8753066 100644 --- a/src/models/ip.go +++ b/src/models/ip.go @@ -149,7 +149,7 @@ func (ip *APIIP) APIConvert() *IP { } return &IP{ IP: ip.IP, - Rdns: sql.NullString{String: ip.Rdns, Valid: true}, + Rdns: sql.NullString{String: ip.Rdns, Valid: false}, Src: ip.Src, Hostname: sql.NullString{String: ip.Hostname, Valid: true}, } @@ -170,6 +170,7 @@ type APIIP struct { Rdns string `json:"rdns"` Src string `json:"src"` Hostname string `json:"hostname"` + Date string `json:"date"` } type Src struct { diff --git a/src/routers/funcs.go b/src/routers/funcs.go index 880e3f4..52db2f5 100644 --- a/src/routers/funcs.go +++ b/src/routers/funcs.go @@ -100,15 +100,6 @@ func RegisterRoutes(e *echo.Echo, ctx *context.Context, cfg *config.Config) { sets, err := models.GetSets(*cfg) return Result(c, err, sets) }) - e.POST("/config/folders", func(c echo.Context) (err error) { - var sets []models.CfgSet - err = c.Bind(&sets) - if err != nil { - return Result(c, err, "Unable to parse JSON") - } - _, err = models.InsertOrUpdateSets(*cfg, sets) - return Result(c, err, sets) - }) e.GET("/config/zmq", func(c echo.Context) (err error) { folders, err := models.GetZMQ(*cfg) return Result(c, err, folders)