mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-09 22:41:05 +00:00
TRA-4263 extensibility refactor (#770)
* Refactor routers * refactor extension loading * refactor server creation code * Update main.go
This commit is contained in:
@@ -7,9 +7,15 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func QueryRoutes(ginApp *gin.Engine) {
|
||||
var (
|
||||
QueryPostValidateHandler = controllers.PostValidate
|
||||
)
|
||||
|
||||
func QueryRoutes(ginApp *gin.Engine) *gin.RouterGroup {
|
||||
routeGroup := ginApp.Group("/query")
|
||||
routeGroup.Use(middlewares.RequiresAuth())
|
||||
|
||||
routeGroup.POST("/validate", controllers.PostValidate)
|
||||
routeGroup.POST("/validate", func(c *gin.Context) { QueryPostValidateHandler(c) })
|
||||
|
||||
return routeGroup
|
||||
}
|
||||
|
Reference in New Issue
Block a user