updated ipbl
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Paul 2022-04-10 12:46:39 +02:00
parent 2c4af80b3d
commit c362158dfb
2 changed files with 2 additions and 10 deletions

View File

@ -149,7 +149,7 @@ func (ip *APIIP) APIConvert() *IP {
} }
return &IP{ return &IP{
IP: ip.IP, IP: ip.IP,
Rdns: sql.NullString{String: ip.Rdns, Valid: true}, Rdns: sql.NullString{String: ip.Rdns, Valid: false},
Src: ip.Src, Src: ip.Src,
Hostname: sql.NullString{String: ip.Hostname, Valid: true}, Hostname: sql.NullString{String: ip.Hostname, Valid: true},
} }
@ -170,6 +170,7 @@ type APIIP struct {
Rdns string `json:"rdns"` Rdns string `json:"rdns"`
Src string `json:"src"` Src string `json:"src"`
Hostname string `json:"hostname"` Hostname string `json:"hostname"`
Date string `json:"date"`
} }
type Src struct { type Src struct {

View File

@ -100,15 +100,6 @@ func RegisterRoutes(e *echo.Echo, ctx *context.Context, cfg *config.Config) {
sets, err := models.GetSets(*cfg) sets, err := models.GetSets(*cfg)
return Result(c, err, sets) 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) { e.GET("/config/zmq", func(c echo.Context) (err error) {
folders, err := models.GetZMQ(*cfg) folders, err := models.GetZMQ(*cfg)
return Result(c, err, folders) return Result(c, err, folders)