fix: chart路由鉴权和日志记录
This commit is contained in:
@@ -2,6 +2,8 @@ package chart
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"ems.agt/src/framework/logger"
|
"ems.agt/src/framework/logger"
|
||||||
|
"ems.agt/src/framework/middleware"
|
||||||
|
"ems.agt/src/framework/middleware/collectlogs"
|
||||||
"ems.agt/src/modules/chart/controller"
|
"ems.agt/src/modules/chart/controller"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@@ -17,21 +19,21 @@ func Setup(router *gin.Engine) {
|
|||||||
chartGraphGroup := chartGroup.Group("/graph")
|
chartGraphGroup := chartGroup.Group("/graph")
|
||||||
{
|
{
|
||||||
chartGraphGroup.GET("",
|
chartGraphGroup.GET("",
|
||||||
// middleware.PreAuthorize(nil),
|
middleware.PreAuthorize(nil),
|
||||||
controller.NewChartGraph.Load,
|
controller.NewChartGraph.Load,
|
||||||
)
|
)
|
||||||
chartGraphGroup.GET("/groups",
|
chartGraphGroup.GET("/groups",
|
||||||
// middleware.PreAuthorize(nil),
|
middleware.PreAuthorize(nil),
|
||||||
controller.NewChartGraph.GroupNames,
|
controller.NewChartGraph.GroupNames,
|
||||||
)
|
)
|
||||||
chartGraphGroup.POST("",
|
chartGraphGroup.POST("",
|
||||||
// middleware.PreAuthorize(nil),
|
middleware.PreAuthorize(nil),
|
||||||
// collectlogs.OperateLog(collectlogs.OptionNew("网元关系图", collectlogs.BUSINESS_TYPE_UPDATE)),
|
collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.chartGraph", collectlogs.BUSINESS_TYPE_UPDATE)),
|
||||||
controller.NewChartGraph.Save,
|
controller.NewChartGraph.Save,
|
||||||
)
|
)
|
||||||
chartGraphGroup.DELETE("/:group",
|
chartGraphGroup.DELETE("/:group",
|
||||||
// middleware.PreAuthorize(nil),
|
middleware.PreAuthorize(nil),
|
||||||
// collectlogs.OperateLog(collectlogs.OptionNew("网元关系图", collectlogs.BUSINESS_TYPE_UPDATE)),
|
collectlogs.OperateLog(collectlogs.OptionNew("log.operate.title.chartGraph", collectlogs.BUSINESS_TYPE_DELETE)),
|
||||||
controller.NewChartGraph.Delete,
|
controller.NewChartGraph.Delete,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user