mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-25 02:31:13 -05:00
Optimize select queries
This commit is contained in:
@@ -42,7 +42,7 @@ export async function submitCompanyCreation(
|
||||
},
|
||||
status: 'pending' as const
|
||||
})
|
||||
.select()
|
||||
.select('id')
|
||||
.single();
|
||||
|
||||
if (submissionError) throw submissionError;
|
||||
@@ -81,7 +81,7 @@ export async function submitCompanyUpdate(
|
||||
// Fetch existing company data (all fields for original_data)
|
||||
const { data: existingCompany, error: fetchError } = await supabase
|
||||
.from('companies')
|
||||
.select('*')
|
||||
.select('id, name, slug, description, company_type, person_type, logo_url, card_image_url, banner_image_url, banner_image_id, card_image_id, headquarters_location, website_url, founded_year, founded_date, founded_date_precision')
|
||||
.eq('id', companyId)
|
||||
.single();
|
||||
|
||||
@@ -120,7 +120,7 @@ export async function submitCompanyUpdate(
|
||||
},
|
||||
status: 'pending' as const
|
||||
})
|
||||
.select()
|
||||
.select('id')
|
||||
.single();
|
||||
|
||||
if (submissionError) throw submissionError;
|
||||
|
||||
Reference in New Issue
Block a user