From c4cfa709c7fb1f6d74bf22fa1640f7bd689c3c15 Mon Sep 17 00:00:00 2001 From: leewinddy Date: Tue, 2 Jul 2024 13:32:18 +0800 Subject: [PATCH] Update sys_system.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 系统信息的读取不需要记录操作日志 因为这个是周期性的请求接口,会产生大量无用的操作日志 --- server/router/system/sys_system.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/router/system/sys_system.go b/server/router/system/sys_system.go index 92720c607a..21ce5b5aa7 100644 --- a/server/router/system/sys_system.go +++ b/server/router/system/sys_system.go @@ -11,10 +11,11 @@ type SysRouter struct{} func (s *SysRouter) InitSystemRouter(Router *gin.RouterGroup) { sysRouter := Router.Group("system").Use(middleware.OperationRecord()) systemApi := v1.ApiGroupApp.SystemApiGroup.SystemApi + operationMiddleware := middleware.OperationRecord() { sysRouter.POST("getSystemConfig", systemApi.GetSystemConfig) // 获取配置文件内容 - sysRouter.POST("setSystemConfig", systemApi.SetSystemConfig) // 设置配置文件内容 + sysRouter.POST("setSystemConfig", systemApi.SetSystemConfig, operationMiddleware) // 设置配置文件内容 sysRouter.POST("getServerInfo", systemApi.GetServerInfo) // 获取服务器信息 - sysRouter.POST("reloadSystem", systemApi.ReloadSystem) // 重启服务 + sysRouter.POST("reloadSystem", systemApi.ReloadSystem, operationMiddleware) // 重启服务 } }