mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 05:55:13 +00:00
games endpoint and controller
This commit is contained in:
@@ -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))
|
||||
}
|
||||
Reference in New Issue
Block a user