2
0

sys_system.go 717 B

12345678910111213141516171819202122
  1. package system
  2. import (
  3. "github.com/flipped-aurora/gin-vue-admin/server/middleware"
  4. "github.com/gin-gonic/gin"
  5. )
  6. type SysRouter struct{}
  7. func (s *SysRouter) InitSystemRouter(Router *gin.RouterGroup) {
  8. sysRouter := Router.Group("system").Use(middleware.OperationRecord())
  9. sysRouterWithoutRecord := Router.Group("system")
  10. {
  11. sysRouter.POST("setSystemConfig", systemApi.SetSystemConfig) // 设置配置文件内容
  12. sysRouter.POST("reloadSystem", systemApi.ReloadSystem) // 重启服务
  13. }
  14. {
  15. sysRouterWithoutRecord.POST("getSystemConfig", systemApi.GetSystemConfig) // 获取配置文件内容
  16. sysRouterWithoutRecord.POST("getServerInfo", systemApi.GetServerInfo) // 获取服务器信息
  17. }
  18. }