added fixture scheduling
This commit is contained in:
@@ -188,11 +188,52 @@ func addRoutes(
|
||||
Method: hws.MethodDELETE,
|
||||
Handler: perms.RequirePermission(s, permissions.FixturesDelete)(handlers.SeasonLeagueDeleteFixtures(s, conn)),
|
||||
},
|
||||
{
|
||||
Path: "/fixtures/{fixture_id}",
|
||||
Method: hws.MethodGET,
|
||||
Handler: handlers.FixtureDetailPage(s, conn),
|
||||
},
|
||||
{
|
||||
Path: "/fixtures/{fixture_id}",
|
||||
Method: hws.MethodDELETE,
|
||||
Handler: perms.RequirePermission(s, permissions.FixturesDelete)(handlers.DeleteFixture(s, conn)),
|
||||
},
|
||||
// Fixture scheduling routes
|
||||
{
|
||||
Path: "/fixtures/{fixture_id}/schedule",
|
||||
Method: hws.MethodPOST,
|
||||
Handler: handlers.ProposeSchedule(s, conn),
|
||||
},
|
||||
{
|
||||
Path: "/fixtures/{fixture_id}/schedule/{schedule_id}/accept",
|
||||
Method: hws.MethodPOST,
|
||||
Handler: handlers.AcceptSchedule(s, conn),
|
||||
},
|
||||
{
|
||||
Path: "/fixtures/{fixture_id}/schedule/{schedule_id}/reject",
|
||||
Method: hws.MethodPOST,
|
||||
Handler: handlers.RejectSchedule(s, conn),
|
||||
},
|
||||
{
|
||||
Path: "/fixtures/{fixture_id}/schedule/{schedule_id}/withdraw",
|
||||
Method: hws.MethodPOST,
|
||||
Handler: handlers.WithdrawSchedule(s, conn),
|
||||
},
|
||||
{
|
||||
Path: "/fixtures/{fixture_id}/schedule/postpone",
|
||||
Method: hws.MethodPOST,
|
||||
Handler: handlers.PostponeSchedule(s, conn),
|
||||
},
|
||||
{
|
||||
Path: "/fixtures/{fixture_id}/schedule/reschedule",
|
||||
Method: hws.MethodPOST,
|
||||
Handler: handlers.RescheduleFixture(s, conn),
|
||||
},
|
||||
{
|
||||
Path: "/fixtures/{fixture_id}/schedule/cancel",
|
||||
Method: hws.MethodPOST,
|
||||
Handler: perms.RequirePermission(s, permissions.FixturesManage)(handlers.CancelSchedule(s, conn)),
|
||||
},
|
||||
}
|
||||
|
||||
teamRoutes := []hws.Route{
|
||||
|
||||
Reference in New Issue
Block a user