chore: worker cleanup

This commit is contained in:
Cory Dransfeldt 2024-10-18 11:44:47 -07:00
parent 8b2648f23f
commit 3aadaeb741
No known key found for this signature in database
10 changed files with 464 additions and 425 deletions

View file

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