mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-10 16:01:08 +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
81.1%
TypeScript
15.4%
Rust
2%
PLpgSQL
0.8%
JavaScript
0.5%
Other
0.1%