From 0bc653e09dfa76382e1f28aa91b2ec4d56bf8e31 Mon Sep 17 00:00:00 2001 From: Studio-18 Date: Sat, 22 Nov 2025 14:08:12 -0800 Subject: [PATCH 1/2] Align createMatch payload with API requirements --- src/api/matches.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/api/matches.ts b/src/api/matches.ts index 0d657fef..3fb11784 100644 --- a/src/api/matches.ts +++ b/src/api/matches.ts @@ -221,14 +221,15 @@ export const createMatch = async ({ status, match_type: matchType, location_text: locationText, - location: locationText, - listing_visibility: "listed", }; + if (matchType === "open") { + payload.listing_visibility = "listed"; + } + const startIso = toIsoString(startDateTime); if (startIso) { payload.start_date_time = startIso; - payload.dateTime = startIso; } if (typeof latitude === "number") payload.latitude = latitude; @@ -236,17 +237,14 @@ export const createMatch = async ({ if (typeof rosterSize === "number") { payload.player_limit = rosterSize; - payload.playerCount = rosterSize; } if (matchType === "open" && skillLevel !== undefined && skillLevel !== null && `${skillLevel}`.trim() !== "") { payload.skill_level_min = skillLevel; - payload.skillLevel = skillLevel; } if (matchFormat) { payload.match_format = matchFormat; - payload.format = matchFormat; } if (notes) { From 20f4671a6171f635c541a781a05a25f2162981ce Mon Sep 17 00:00:00 2001 From: Studio-18 Date: Sat, 22 Nov 2025 18:27:29 -0800 Subject: [PATCH 2/2] Ensure open matches are created visible --- src/api/matches.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/matches.ts b/src/api/matches.ts index 3fb11784..ec0b9068 100644 --- a/src/api/matches.ts +++ b/src/api/matches.ts @@ -224,6 +224,8 @@ export const createMatch = async ({ }; if (matchType === "open") { + payload.hidden = false; + payload.is_hidden = false; payload.listing_visibility = "listed"; }