mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-24 23:51:54 +08:00
feat: support deleting logs based on filtering results (#35)
* feat: support deleting logs based on filtering results * fix(record): fix the problem of wrong number of parameters when outputting delete logs
This commit is contained in:
+10
-5
@@ -77,19 +77,24 @@ func (revsuit *Revsuit) registerHttpRouter() {
|
||||
recordGroup := revsuit.http.ApiGroup.Group("/record")
|
||||
|
||||
httpGroup := recordGroup.Group("/http")
|
||||
httpGroup.GET("", rhttp.ListRecords)
|
||||
httpGroup.GET("", rhttp.Records)
|
||||
httpGroup.DELETE("", rhttp.Records)
|
||||
|
||||
dnsGroup := recordGroup.Group("/dns")
|
||||
dnsGroup.GET("", dns.ListRecords)
|
||||
dnsGroup.GET("", dns.Records)
|
||||
dnsGroup.DELETE("", dns.Records)
|
||||
|
||||
mysqlGroup := recordGroup.Group("/mysql")
|
||||
mysqlGroup.GET("", mysql.ListRecords)
|
||||
mysqlGroup.GET("", mysql.Records)
|
||||
mysqlGroup.DELETE("", mysql.Records)
|
||||
|
||||
rmiGroup := recordGroup.Group("/rmi")
|
||||
rmiGroup.GET("", rmi.ListRecords)
|
||||
rmiGroup.GET("", rmi.Records)
|
||||
rmiGroup.DELETE("", rmi.Records)
|
||||
|
||||
ftpGroup := recordGroup.Group("/ftp")
|
||||
ftpGroup.GET("", ftp.ListRecords)
|
||||
ftpGroup.GET("", ftp.Records)
|
||||
ftpGroup.DELETE("", ftp.Records)
|
||||
|
||||
// init rule router group
|
||||
ruleGroup := revsuit.http.ApiGroup.Group("/rule")
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
log "unknwon.dev/clog/v2"
|
||||
)
|
||||
|
||||
const VERSION = "0.1.7"
|
||||
const VERSION = "0.2.0"
|
||||
|
||||
type Revsuit struct {
|
||||
config *Config
|
||||
@@ -60,7 +60,7 @@ func initDatabase(dsn string) {
|
||||
Level: log.LevelInfo,
|
||||
})
|
||||
|
||||
err := database.InitDB("sqlite", dsn)
|
||||
err := database.InitDB(database.Sqlite, dsn)
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user