]> git.r.bdr.sh - rbdr/forum/blob - src/lib/stores/users.ts
2a56cb5f7b9b40cef2cd8ca76699807f853bb559
[rbdr/forum] / src / lib / stores / users.ts
1 import { createClient } from '@supabase/supabase-js'
2 import { single } from './supabase';
3 import { supabase } from '$lib/config/config';
4
5 import type { User } from '$lib/data/types';
6
7 const client = createClient(supabase.url, supabase.key);
8
9 export const user = (id: string) => single<User>(client
10 .from('users')
11 .select('*')
12 .eq('id', id),
13 null);