mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 04:27:56 +00:00
205e22e083d42f56d02c0c91e183c2d0d5da616e
Changes: 1. Created migration 004_create_upsert_function.sql: - Creates upsert_user_profile() function with SECURITY DEFINER - Bypasses RLS to allow profile creation/updates - Only accessible to authenticated users via auth.uid() 2. Updated ProfileSettings.tsx: - Changed from direct upsert to RPC function call - Updated updateProfile() to use supabase.rpc() - Updated updateNotificationSettings() to use same function This solves the RLS policy violation by using a secure server-side function that properly handles authentication. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Languages
HTML
75.2%
TypeScript
21.3%
Rust
1.9%
PLpgSQL
0.7%
JavaScript
0.6%
Other
0.2%