remove: remove getBusinessByUserId with *

This commit is contained in:
Sosokker 2024-11-07 03:27:02 +07:00
parent 9db518cb6b
commit f0c4f5df89

View File

@ -18,17 +18,6 @@ export const getAllBusinesses = (client: SupabaseClient) => {
`);
};
export async function getBusinessByUserId(client: SupabaseClient, userId: string) {
const { data, error } = await client.from("business").select("*").eq("user_id", userId);
if (error) {
console.error("Error fetching business ID:", error);
return null;
}
return data;
}
export const getBusinessByName = (
client: SupabaseClient,
params: { businessName?: string | null; single?: boolean } = { single: false }