games endpoint and controller

This commit is contained in:
Ravi Prasad
2025-07-16 23:45:31 -05:00
parent 7dcec04f5d
commit 681bf80408
9 changed files with 1734 additions and 3 deletions
+15
View File
@@ -0,0 +1,15 @@
package routes
import (
"github.com/gofiber/fiber/v2"
"gorm.io/gorm"
"github.com/nprasad2077/NBA_Go/controllers"
)
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))
}