backend functioning. Player models init

This commit is contained in:
Ravi Prasad
2025-04-30 21:19:31 -05:00
parent bde752041f
commit e269bc5145
10 changed files with 278 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
package routes
import (
"github.com/gofiber/fiber/v2"
"gorm.io/gorm"
"github.com/nprasad2077/NBA_Go/controllers"
)
func RegisterPlayerRoutes(app *fiber.App, db *gorm.DB) {
api := app.Group("/api/playerstats")
api.Get("/fetch", controllers.FetchPlayerStats(db))
api.Get("/", controllers.GetAllPlayerStats(db)) // ✅ Add this line
}