chore: add more log types

This commit is contained in:
JustSong
2023-06-10 16:31:40 +08:00
parent 74f508e847
commit d29c273073
4 changed files with 19 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package controller
import (
"encoding/json"
"fmt"
"github.com/gin-contrib/sessions"
"github.com/gin-gonic/gin"
"net/http"
@@ -351,6 +352,9 @@ func UpdateUser(c *gin.Context) {
})
return
}
if originUser.Quota != updatedUser.Quota {
model.RecordLog(originUser.Id, model.LogTypeManage, fmt.Sprintf("管理员将用户额度从 %d 点修改为 %d 点", originUser.Quota, updatedUser.Quota))
}
c.JSON(http.StatusOK, gin.H{
"success": true,
"message": "",