This commit is contained in:
Ravi Prasad
2025-06-03 21:29:16 -05:00
parent a3225b1803
commit 24ec6675c9
7 changed files with 108 additions and 107 deletions
+3 -3
View File
@@ -1,11 +1,11 @@
package config package config
import ( import (
"log"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
"github.com/nprasad2077/NBA_Go/models" "github.com/nprasad2077/NBA_Go/models"
"github.com/nprasad2077/NBA_Go/utils/metrics" "github.com/nprasad2077/NBA_Go/utils/metrics"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
"log"
) )
func InitDB(shouldMigrate bool) *gorm.DB { func InitDB(shouldMigrate bool) *gorm.DB {
@@ -32,7 +32,9 @@ import (
// ScrapePlayerShotChart godoc // ScrapePlayerShotChart godoc
// @Summary Scrape a player's shot-chart from BR website // @Summary Scrape a player's shot-chart from BR website
// @Description Scrapes seasons [startSeason…endSeason] for the given playerId // @Description Scrapes seasons [startSeason…endSeason] for the given playerId
//
// (playerName is auto-detected). // (playerName is auto-detected).
//
// @Tags PlayerShotChart // @Tags PlayerShotChart
// @Accept json // @Accept json
// @Produce json // @Produce json
+1 -2
View File
@@ -14,9 +14,9 @@ package controllers
import ( import (
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
"github.com/nprasad2077/NBA_Go/models"
"github.com/nprasad2077/NBA_Go/services" "github.com/nprasad2077/NBA_Go/services"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/nprasad2077/NBA_Go/models"
) )
// func FetchPlayerTotalStats(db *gorm.DB) fiber.Handler { // func FetchPlayerTotalStats(db *gorm.DB) fiber.Handler {
@@ -56,7 +56,6 @@ func ScrapePlayerTotalStats(db *gorm.DB) fiber.Handler {
} }
} }
// GetPlayerTotalStats godoc // GetPlayerTotalStats godoc
// @Security ApiKeyAuth // @Security ApiKeyAuth
// @Summary Get player total stats // @Summary Get player total stats