updated ipbl
This commit is contained in:
parent
2c4af80b3d
commit
c362158dfb
@ -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 {
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user