wideesg-report-api/Router/router.go

22 lines
360 B
Go
Raw Normal View History

2021-11-24 14:49:24 +08:00
package Router
import (
"ESG/Controllers"
"ESG/Middlewares"
"github.com/gin-gonic/gin"
)
func InitRouter() {
router := gin.Default()
router.Use(Middlewares.Cors())
toC := router.Group("/api")
{
toC.GET("/list", Controllers.GetList)
toC.GET("/details", Controllers.GetDetails)
toC.POST("/issue", Controllers.SetNews)
}
2021-11-26 15:01:41 +08:00
router.Run(":51002")
2021-11-24 14:49:24 +08:00
}