mirror of
https://github.com/AuxXxilium/docker-ddns-server.git
synced 2024-11-23 23:00:59 +07:00
fixed clear logs
This commit is contained in:
parent
7e415a710f
commit
217cb2a575
@ -59,8 +59,8 @@ func (h *Handler) ShowHostLogs(c echo.Context) (err error) {
|
||||
}
|
||||
|
||||
func (h *Handler) ClearLogs() {
|
||||
var clearInterval = strconv.FormatUint(h.ClearInterval, 10) + " days"
|
||||
h.DB.Exec("DELETE FROM LOGS WHERE created_at < datetime('now', '" + clearInterval + "');REINDEX LOGS;")
|
||||
var clearInterval = strconv.FormatUint(h.ClearInterval, 10) + " day"
|
||||
h.DB.Exec("DELETE FROM LOGS WHERE created_at < datetime('now', '-" + clearInterval + "');REINDEX LOGS;")
|
||||
h.LastClearedLogs = time.Now()
|
||||
log.Print("logs cleared")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user