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:
2026-05-10 16:19:35 +03:00
parent 73516f69a0
commit 05c1459e2f
+2 -1
View File
@@ -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);