@@ -9,16 +9,17 @@ import (
|
||||
//docs "github.com/go-project-name/docs"
|
||||
|
||||
func InitRouter() *gin.Engine {
|
||||
r := gin.New()
|
||||
r := gin.Default()
|
||||
//docs.SwaggerInfo.BasePath = "/api/v1"
|
||||
r.Use(gin.Logger())
|
||||
r.Use(gin.Recovery())
|
||||
//CORS
|
||||
|
||||
apiv1 := r.Group("/api/v1")
|
||||
apiv1.Use()
|
||||
{
|
||||
apiv1.GET("/admincards", v1.GetAdminCards)
|
||||
apiv1.GET("/images", v1.GetImages)
|
||||
apiv1.GET("/person-of-note", v1.GetAdminCards)
|
||||
apiv1.GET("/index-images", v1.GetImages)
|
||||
apiv1.GET("/splash", v1.GetSplash)
|
||||
}
|
||||
return r
|
||||
|
||||
Reference in New Issue
Block a user