player profile added
This commit is contained in:
@@ -64,6 +64,11 @@ func addRoutes(
|
||||
Methods: []hws.Method{hws.MethodGET, hws.MethodPOST},
|
||||
Handler: auth.LoginReq(handlers.Logout(s, auth, conn, discordAPI)),
|
||||
},
|
||||
{
|
||||
Path: "/profile",
|
||||
Method: hws.MethodGET,
|
||||
Handler: auth.LoginReq(handlers.ProfileRedirect(s)),
|
||||
},
|
||||
}
|
||||
|
||||
seasonRoutes := []hws.Route{
|
||||
@@ -295,6 +300,19 @@ func addRoutes(
|
||||
},
|
||||
}
|
||||
|
||||
playerRoutes := []hws.Route{
|
||||
{
|
||||
Path: "/players/{player_id}",
|
||||
Method: hws.MethodGET,
|
||||
Handler: handlers.PlayerView(s, conn),
|
||||
},
|
||||
{
|
||||
Path: "/players/{player_id}/link-slapid",
|
||||
Method: hws.MethodPOST,
|
||||
Handler: auth.LoginReq(handlers.LinkPlayerSlapID(s, conn, slapAPI)),
|
||||
},
|
||||
}
|
||||
|
||||
teamRoutes := []hws.Route{
|
||||
{
|
||||
Path: "/teams",
|
||||
@@ -468,6 +486,7 @@ func addRoutes(
|
||||
routes = append(routes, leagueRoutes...)
|
||||
routes = append(routes, fixturesRoutes...)
|
||||
routes = append(routes, teamRoutes...)
|
||||
routes = append(routes, playerRoutes...)
|
||||
|
||||
// Register the routes with the server
|
||||
err := s.AddRoutes(routes...)
|
||||
|
||||
Reference in New Issue
Block a user