added player stats to profile

This commit is contained in:
2026-03-06 20:48:21 +11:00
parent 788346d269
commit 060301f2c2
10 changed files with 817 additions and 78 deletions

View File

@@ -304,7 +304,27 @@ func addRoutes(
{
Path: "/players/{player_id}",
Method: hws.MethodGET,
Handler: handlers.PlayerView(s, conn),
Handler: handlers.PlayerViewStats(s, conn),
},
{
Path: "/players/{player_id}/stats",
Methods: []hws.Method{hws.MethodGET, hws.MethodPOST},
Handler: handlers.PlayerViewStats(s, conn),
},
{
Path: "/players/{player_id}/teams",
Methods: []hws.Method{hws.MethodGET, hws.MethodPOST},
Handler: handlers.PlayerViewTeams(s, conn),
},
{
Path: "/players/{player_id}/seasons",
Methods: []hws.Method{hws.MethodGET, hws.MethodPOST},
Handler: handlers.PlayerViewSeasons(s, conn),
},
{
Path: "/players/{player_id}/stats/filter",
Method: hws.MethodPOST,
Handler: handlers.PlayerStatsFilter(s, conn),
},
{
Path: "/players/{player_id}/link-slapid",