This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

semble / src / webapp / features / profile / lib / dal.ts
617 B 21 lines
1import { verifySessionOnClient } from '@/lib/auth/dal'; 2import { createSembleClient } from '@/services/apiClient'; 3import { cache } from 'react'; 4 5export const getProfile = cache(async (didOrHandle: string) => { 6 const client = createSembleClient(); 7 const response = await client.getProfile({ 8 identifier: didOrHandle, 9 }); 10 11 return response; 12}); 13 14export const getMyProfile = cache(async () => { 15 const session = await verifySessionOnClient(); 16 if (!session) throw new Error('No session found'); 17 const client = createSembleClient(); 18 const response = await client.getMyProfile(); 19 20 return response; 21});