mirror of
https://github.com/komari-monitor/komari.git
synced 2025-11-02 04:53:27 +00:00
新增 Dockerfile
新增 chpasswd 指令强制修改密码 修改 数据库init移入到server块 重命名 history 包至 records
This commit is contained in:
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/akizon77/komari/database/clients"
|
||||
"github.com/akizon77/komari/database/dbcore"
|
||||
"github.com/akizon77/komari/database/history"
|
||||
"github.com/akizon77/komari/database/models"
|
||||
"github.com/akizon77/komari/database/records"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@@ -71,11 +71,11 @@ func RemoveClient(c *gin.Context) {
|
||||
c.JSON(200, gin.H{"status": "success"})
|
||||
}
|
||||
|
||||
func ClearHistory(c *gin.Context) {
|
||||
if err := history.DeleteAll(); err != nil {
|
||||
func ClearRecord(c *gin.Context) {
|
||||
if err := records.DeleteAll(); err != nil {
|
||||
c.JSON(500, gin.H{
|
||||
"status": "error",
|
||||
"error": "Failed to delete history" + err.Error(),
|
||||
"error": "Failed to delete Record" + err.Error(),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user