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