mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 07:51:13 -05:00
Fix duplicate key error
This commit is contained in:
@@ -104,12 +104,14 @@ export function LocationTab() {
|
||||
|
||||
if (profileError) throw profileError;
|
||||
|
||||
// Save accessibility preferences
|
||||
const { error: accessibilityError } = await supabase.from('user_preferences').upsert([{
|
||||
user_id: user.id,
|
||||
accessibility_options: accessibility as any,
|
||||
updated_at: new Date().toISOString()
|
||||
}]);
|
||||
// Save accessibility preferences - update existing record
|
||||
const { error: accessibilityError } = await supabase
|
||||
.from('user_preferences')
|
||||
.update({
|
||||
accessibility_options: accessibility as any,
|
||||
updated_at: new Date().toISOString()
|
||||
})
|
||||
.eq('user_id', user.id);
|
||||
|
||||
if (accessibilityError) throw accessibilityError;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user