优化页面、修复BUG
This commit is contained in:
@@ -70,13 +70,16 @@ func OperationLogMiddleware() gin.HandlerFunc {
|
||||
log.Printf("Creating operation log: UserID=%d, IP=%s, Region=%s, Path=%s", userID.(uint), ip, region, c.Request.URL.Path)
|
||||
|
||||
// 构建操作日志
|
||||
path := c.Request.URL.Path
|
||||
method := c.Request.Method
|
||||
operationLog := &models.OperationLog{
|
||||
UserID: userID.(uint),
|
||||
Username: username.(string),
|
||||
IP: ip,
|
||||
Region: region,
|
||||
Path: c.Request.URL.Path,
|
||||
Method: c.Request.Method,
|
||||
Path: path,
|
||||
Method: method,
|
||||
Action: utils.GetOperationAction(path, method),
|
||||
Params: string(requestBody),
|
||||
Status: c.Writer.Status(),
|
||||
Duration: duration,
|
||||
|
||||
Reference in New Issue
Block a user