File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ export * from '@/lib/features/todos'
2020export * from '@/lib/features/wiki'
2121export * from '@/lib/features/meetings'
2222export * from '@/lib/features/files'
23+ export * from '@/lib/features/games'
2324
2425// Server-only exports are NOT re-exported here to prevent client bundle issues
2526// Import directly when needed:
Original file line number Diff line number Diff line change 1- import 'server-only'
21import { createClient } from '@/lib/database/supabase-client'
32import { logActivity } from '@/lib/features/activity'
43import type { FileRecord } from '@/lib/database/connection'
Original file line number Diff line number Diff line change 1- import 'server-only'
21import { createClient } from '@/lib/database/supabase-client'
32
43export async function saveScore ( userId : string , game : string , score : number ) {
Original file line number Diff line number Diff line change 1- import 'server-only'
21import { createClient } from '@/lib/database/supabase-client'
32import { logActivity } from '@/lib/features/activity'
43import type { Meeting } from '@/lib/database/connection'
Original file line number Diff line number Diff line change 1- import 'server-only'
21import { createClient } from '@/lib/database/supabase-client'
32import { logActivity } from '@/lib/features/activity'
43import type { Project , ProjectCollaborator } from '@/lib/database/connection'
@@ -90,3 +89,14 @@ export async function searchUsers(query: string) {
9089 const data = await res . json ( )
9190 return data . users || [ ]
9291}
92+
93+ export async function getProfileByEmail ( email : string ) {
94+ const supabase = createClient ( )
95+ const { data, error } = await supabase
96+ . from ( 'profiles' )
97+ . select ( '*' )
98+ . eq ( 'email' , email )
99+ . single ( )
100+ if ( error && error . code !== 'PGRST116' ) throw error
101+ return data || null
102+ }
Original file line number Diff line number Diff line change 1- import 'server-only'
21import { createClient } from '@/lib/database/supabase-client'
32import { logActivity } from '@/lib/features/activity'
43import type { Todo } from '@/lib/database/connection'
Original file line number Diff line number Diff line change 1- import 'server-only'
21import { createClient } from '@/lib/database/supabase-client'
32import type { WikiArticle } from '@/lib/database/connection'
43
Original file line number Diff line number Diff line change 1010 },
1111 "dependencies" : {
1212 "@ai-sdk/google" : " ^3.0.13" ,
13+ "@ai-sdk/groq" : " ^0.1.10" ,
1314 "@ai-sdk/react" : " ^3.0.51" ,
1415 "@heroicons/react" : " ^2.2.0" ,
1516 "@hookform/resolvers" : " ^3.10.0" ,
You can’t perform that action at this time.
0 commit comments