mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-25 17:38:02 +00:00
02f5718211fde4b240992dce636487e5abc95ad1
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%