mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 13:31:12 -05:00
Refactor: Use RPC for user data
This commit is contained in:
@@ -69,10 +69,10 @@ export function ReassignDialog({
|
||||
|
||||
const userIds = roles.map((r) => r.user_id);
|
||||
|
||||
const { data: profiles, error: profilesError } = await supabase
|
||||
.from('profiles')
|
||||
.select('user_id, username, display_name')
|
||||
.in('user_id', userIds);
|
||||
const { data: allProfiles, error: profilesError } = await supabase
|
||||
.rpc('get_users_with_emails');
|
||||
|
||||
const profiles = allProfiles?.filter(p => userIds.includes(p.user_id));
|
||||
|
||||
if (profilesError) throw profilesError;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user