diff --git a/api/supabase/queries/plantSeasonality.ts b/api/supabase/queries/plantSeasonality.ts index 8fdda29..005f90c 100644 --- a/api/supabase/queries/plantSeasonality.ts +++ b/api/supabase/queries/plantSeasonality.ts @@ -4,9 +4,10 @@ import supabase from '../createClient'; export async function getPlantSeasonality( input_state: string, ): Promise { - const { data, error } = await supabase.rpc('get_plant_seasonality', { - input_state, - }); + const { data, error } = await supabase + .from('plant_seasonality') + .select('*') + .eq('state', input_state); if (error) throw new Error(`Error fetching plant seasonality: ${error.message}`); return data;