chore: normalize formatting for workers

This commit is contained in:
Cory Dransfeldt 2024-10-19 19:53:31 -07:00
parent 2f6cfbe7ae
commit 2cd835d31b
No known key found for this signature in database
14 changed files with 879 additions and 604 deletions

View file

@ -1,19 +1,26 @@
export const fetchDataByUrl = async (supabase, table, url) => {
const { data, error } = await supabase.from(table).select('*').eq('url', url).single()
const { data, error } = await supabase
.from(table)
.select("*")
.eq("url", url)
.single();
if (error) {
console.error(`Error fetching from ${table}:`, error)
return null
console.error(`Error fetching from ${table}:`, error);
return null;
}
return data
}
return data;
};
export const fetchGlobals = async (supabase) => {
const { data, error } = await supabase.from('optimized_globals').select('*').single()
const { data, error } = await supabase
.from("optimized_globals")
.select("*")
.single();
if (error) {
console.error('Error fetching globals:', error)
return {}
console.error("Error fetching globals:", error);
return {};
}
return data
}
return data;
};