package routes import ( "gat1400Exchange/controller" "github.com/gin-gonic/gin" ) func InitWebApiRouters(r *gin.RouterGroup) gin.IRoutes { subCtl := controller.NewSubscribeController() router := r.Group("/subscribe") { router.POST("/:id", subCtl.CreateSubscribes) router.PUT("/:id", subCtl.UpdateSubscribes) router.PUT("/cancel/:id", subCtl.CancelSubscribes) router.GET("/list/:id", subCtl.List) router.GET("/remote_list/:id", subCtl.RemoteList) //router.GET("/:id", subCtl.Faces) //router.DELETE("/:id", subCtl.Faces) } platCtl := controller.NewSubPlatformController() router = r.Group("/sub_platform") { router.GET("/list", platCtl.List) router.POST("/create", platCtl.Create) router.PUT("/:id", platCtl.Update) router.DELETE("/:id", platCtl.Delete) } return r }