This repository has no description
1import { createServerSembleClient } from '@/services/server.apiClient';
2import { cache } from 'react';
3
4/**
5 * Server-only version of getProfile that includes authentication.
6 * This version passes the caller's access token, enabling the backend
7 * to return personalized data like isFollowing status.
8 *
9 * Use this in Server Components only.
10 * For Client Components, use getProfile from dal.ts instead.
11 */
12export const getProfile = cache(
13 async (didOrHandle: string, includeStats?: boolean) => {
14 const client = await createServerSembleClient();
15 const response = await client.getProfile({
16 identifier: didOrHandle,
17 includeStats,
18 });
19
20 return response;
21 },
22);