This commit is contained in:
giancarlo
2024-03-24 02:23:22 +08:00
parent 648d77b430
commit bce3479368
589 changed files with 37067 additions and 9596 deletions

View File

@@ -0,0 +1,25 @@
import getSupabaseServerComponentClient from '@packages/supabase/server-component-client';
import { USERS_TABLE } from '@/lib/db-tables';
export async function getUsers(ids: string[]) {
const client = getSupabaseServerComponentClient({ admin: true });
const { data: users, error } = await client
.from(USERS_TABLE)
.select(
`
id,
photoURL: photo_url,
displayName: display_name,
onboarded
`,
)
.in('id', ids);
if (error) {
throw error;
}
return users;
}