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