This commit is contained in:
Eden Kirin
2024-01-15 23:33:23 +01:00
parent f220d08800
commit 8bc736114c
26 changed files with 20149 additions and 0 deletions

View File

@ -72,6 +72,7 @@ func handleGetProduct(dbConn *gorm.DB) gin.HandlerFunc {
func initRouter(dbConn *gorm.DB) *gin.Engine {
gin.SetMode(gin.ReleaseMode)
router := gin.Default()
router.Use(corsMiddleware())
routes := router.Group("/products")
{