fix: 修复日志记录应用列为空的问题
- 添加LogOperationWithApp方法支持传入ApplicationID - 创建/更新/删除卡密类型时记录ApplicationID - 创建/更新应用时记录ApplicationID
This commit is contained in:
@@ -242,7 +242,7 @@ func handleCreateApplication(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
service.LogOperation(c, "create", "application", &app.ID, fmt.Sprintf("创建应用: %s", app.Name), nil)
|
||||
service.LogOperationWithApp(c, &app.ID, "create", "application", &app.ID, fmt.Sprintf("创建应用: %s", app.Name), nil)
|
||||
|
||||
response.Success(c, gin.H{
|
||||
"application": app,
|
||||
@@ -405,7 +405,7 @@ func handleUpdateApplication(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
service.LogOperation(c, "update", "application", &app.ID, fmt.Sprintf("更新应用: %s", app.Name), nil)
|
||||
service.LogOperationWithApp(c, &app.ID, "update", "application", &app.ID, fmt.Sprintf("更新应用: %s", app.Name), nil)
|
||||
|
||||
response.Success(c, app)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user