mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 13:31:12 -05:00
Optimize select queries
This commit is contained in:
@@ -207,7 +207,7 @@ export async function submitParkCreation(
|
||||
},
|
||||
status: 'pending' as const
|
||||
})
|
||||
.select()
|
||||
.select('id')
|
||||
.single();
|
||||
|
||||
if (submissionError) throw submissionError;
|
||||
@@ -260,7 +260,7 @@ export async function submitParkUpdate(
|
||||
// Fetch existing park data first
|
||||
const { data: existingPark, error: fetchError } = await supabase
|
||||
.from('parks')
|
||||
.select('*')
|
||||
.select('id, name, slug, description, park_type, status, opening_date, opening_date_precision, closing_date, closing_date_precision, website_url, phone, email, location_id, operator_id, property_owner_id, banner_image_url, banner_image_id, card_image_url, card_image_id')
|
||||
.eq('id', parkId)
|
||||
.single();
|
||||
|
||||
@@ -299,7 +299,7 @@ export async function submitParkUpdate(
|
||||
},
|
||||
status: 'pending' as const
|
||||
})
|
||||
.select()
|
||||
.select('id')
|
||||
.single();
|
||||
|
||||
if (submissionError) throw submissionError;
|
||||
@@ -379,7 +379,7 @@ export async function submitRideCreation(
|
||||
},
|
||||
status: 'pending' as const
|
||||
})
|
||||
.select()
|
||||
.select('id')
|
||||
.single();
|
||||
|
||||
if (submissionError) throw submissionError;
|
||||
|
||||
Reference in New Issue
Block a user