Refactor park submission location handling

This commit is contained in:
gpt-engineer-app[bot]
2025-11-05 20:46:02 +00:00
parent f9c11cb064
commit dfd17e8244
4 changed files with 66 additions and 1 deletions

View File

@@ -680,6 +680,17 @@ export async function submitParkCreation(
operator_id: data.operator_id || null,
property_owner_id: data.property_owner_id || null,
location_id: data.location_id || null,
temp_location_data: data.location ? {
name: data.location.name,
city: data.location.city || null,
state_province: data.location.state_province || null,
country: data.location.country,
latitude: data.location.latitude,
longitude: data.location.longitude,
timezone: data.location.timezone || null,
postal_code: data.location.postal_code || null,
display_name: data.location.display_name
} : null,
banner_image_url: bannerImage?.url || data.banner_image_url || null,
banner_image_id: bannerImage?.cloudflare_id || data.banner_image_id || null,
card_image_url: cardImage?.url || data.card_image_url || null,