feat: add tournament type and team support to tournament APIs
Update tournament APIs to support: - tournamentType field (individual/team) - Team creation for team tournaments - Even number validation for team tournaments - Automatic pairing of consecutive players into teams
This commit is contained in:
@@ -144,6 +144,7 @@ export async function PUT(request: Request, { params }: RouteParams) {
|
||||
description,
|
||||
eventDate,
|
||||
eventType,
|
||||
tournamentType,
|
||||
format,
|
||||
status,
|
||||
maxParticipants,
|
||||
@@ -166,6 +167,7 @@ export async function PUT(request: Request, { params }: RouteParams) {
|
||||
description: description || null,
|
||||
eventDate: eventDate ? new Date(eventDate) : null,
|
||||
eventType: eventType || "tournament",
|
||||
tournamentType: tournamentType || "individual",
|
||||
format: format || "round_robin",
|
||||
maxParticipants: maxParticipants ? parseInt(maxParticipants) : null,
|
||||
targetScore: targetScore ? parseInt(targetScore) : null,
|
||||
|
||||
Reference in New Issue
Block a user