feat: add targetScore and allowTies fields to tournament API routes
This commit is contained in:
@@ -146,6 +146,8 @@ export async function PUT(request: Request, { params }: RouteParams) {
|
||||
status,
|
||||
maxParticipants,
|
||||
ownerId,
|
||||
targetScore,
|
||||
allowTies,
|
||||
} = body;
|
||||
|
||||
// Validate required fields
|
||||
@@ -164,6 +166,8 @@ export async function PUT(request: Request, { params }: RouteParams) {
|
||||
eventType: eventType || "tournament",
|
||||
format: format || "round_robin",
|
||||
maxParticipants: maxParticipants ? parseInt(maxParticipants) : null,
|
||||
targetScore: targetScore ? parseInt(targetScore) : null,
|
||||
allowTies: allowTies ?? false,
|
||||
};
|
||||
|
||||
// Only allow status updates if they don't conflict with auto-calculation
|
||||
|
||||
Reference in New Issue
Block a user