package router import ( "file_upload/backend/app/controller" middleware "file_upload/backend/app/middlewares" "github.com/gin-gonic/gin" ) func FileInitRouter(engine *gin.Engine) { group := engine.Group("/api") group.Use(middleware.Cors()) group.DELETE("/template", controller.DeleteTemplate) group.POST("/saveTemplate", controller.SaveTemplate) group.POST("/template", controller.TemplateItem) group.GET("/template", controller.GetTemplate) group.GET("/templates", controller.GetTemplates) group.GET("/search", controller.SearchTemplate) }