This commit is contained in:
2026-09-10 13:49:36 -05:00
parent 7a5894d9cb
commit 768f44f669
8 changed files with 13805 additions and 14 deletions
+4 -3
View File
@@ -2,14 +2,15 @@ package routes
import (
"github.com/gofiber/fiber/v2"
"gorm.io/gorm"
"github.com/nprasad2077/NBA_Go/controllers"
"github.com/nprasad2077/NBA_Go/utils/middleware"
"gorm.io/gorm"
)
func RegisterGameRoutes(app *fiber.App, db *gorm.DB) {
// Create a new group for game-related endpoints
api := app.Group("/api/games")
// Register the GET endpoint to fetch games
api.Get("/", controllers.GetGames(db))
// Register the GET endpoint to fetch games with immutable edge caching
api.Get("/", middleware.EdgeCache(middleware.Immutable, "nba-games"), controllers.GetGames(db))
}