chore: normalize formatting for workers
This commit is contained in:
parent
2f6cfbe7ae
commit
2cd835d31b
14 changed files with 879 additions and 604 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Reference in a new issue