feat: improve AI resilience, add background enrichment loading states, and fix duplicate identifier in TagSelector
This commit is contained in:
@@ -7,8 +7,8 @@ export async function deleteTasting(tastingId: string, bottleId: string) {
|
||||
const supabase = await createClient();
|
||||
|
||||
try {
|
||||
const { data: { session } } = await supabase.auth.getSession();
|
||||
if (!session) {
|
||||
const { data: { user } } = await supabase.auth.getUser();
|
||||
if (!user) {
|
||||
throw new Error('Nicht autorisiert.');
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export async function deleteTasting(tastingId: string, bottleId: string) {
|
||||
.from('tastings')
|
||||
.delete()
|
||||
.eq('id', tastingId)
|
||||
.eq('user_id', session.user.id);
|
||||
.eq('user_id', user.id);
|
||||
|
||||
if (deleteError) throw deleteError;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user