This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
api/router/router.go
Stanislaw fa0ae10a7f fix typo
2023-01-03 18:39:42 +01:00

27 lines
463 B
Go

package router
import (
v1 "gractwo-api/router/v1"
"github.com/gin-gonic/gin"
)
//docs "github.com/go-project-name/docs"
func InitRouter() *gin.Engine {
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("/persons-of-note", v1.GetAdminCards)
apiv1.GET("/index-images", v1.GetImages)
apiv1.GET("/splash", v1.GetSplash)
}
return r
}