fix: revert upsert to update in useSettings to satisfy RLS policy
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,8 @@ export function useSettings() {
|
||||
const updatePrice = async (key, value) => {
|
||||
const { error } = await supabase
|
||||
.from('settings')
|
||||
.upsert({ key, value: String(value), updated_at: new Date().toISOString() }, { onConflict: 'key' });
|
||||
.update({ value: String(value), updated_at: new Date().toISOString() })
|
||||
.eq('key', key);
|
||||
|
||||
if (!error) {
|
||||
const thickness = parseInt(key.replace('price_', ''), 10);
|
||||
|
||||
Reference in New Issue
Block a user