mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-11 23:41:32 +00:00
TRA-4263 revert extensible routing (#774)
* Update main.go, extensions.go, and 2 more files... * Update config_routes.go, entries_routes.go, and 7 more files...
This commit is contained in:
@@ -7,25 +7,13 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
var (
|
||||
ServiceMapGetStatus gin.HandlerFunc
|
||||
ServiceMapGet gin.HandlerFunc
|
||||
ServiceMapReset gin.HandlerFunc
|
||||
)
|
||||
|
||||
func ServiceMapRoutes(ginApp *gin.Engine) *gin.RouterGroup {
|
||||
func ServiceMapRoutes(ginApp *gin.Engine) {
|
||||
routeGroup := ginApp.Group("/servicemap")
|
||||
routeGroup.Use(middlewares.RequiresAuth())
|
||||
|
||||
controller := controllers.NewServiceMapController()
|
||||
|
||||
ServiceMapGetStatus = controller.Status
|
||||
ServiceMapGet = controller.Get
|
||||
ServiceMapReset = controller.Reset
|
||||
|
||||
routeGroup.GET("/status", func(c *gin.Context) { ServiceMapGetStatus(c) })
|
||||
routeGroup.GET("/get", func(c *gin.Context) { ServiceMapGet(c) })
|
||||
routeGroup.GET("/reset", func(c *gin.Context) { ServiceMapReset(c) })
|
||||
|
||||
return routeGroup
|
||||
routeGroup.GET("/status", controller.Status)
|
||||
routeGroup.GET("/get", controller.Get)
|
||||
routeGroup.GET("/reset", controller.Reset)
|
||||
}
|
||||
|
Reference in New Issue
Block a user