MCPcopy Create free account
hub / github.com/dailydotdev/apps / getProfileRequest

Function getProfileRequest

packages/shared/src/lib/user.ts:239–259  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

237}
238
239const getProfileRequest = async (id: string) => {
240 const userRes = await fetch(graphqlUrl, {
241 method: 'POST',
242 headers: {
243 'Content-Type': 'application/json',
244 },
245 body: JSON.stringify({
246 query: USER_BY_ID_STATIC_FIELDS_QUERY,
247 variables: {
248 id,
249 },
250 }),
251 credentials: 'include',
252 });
253 if (userRes.status === 404) {
254 throw new Error('not found');
255 }
256
257 const response = await userRes.json();
258 return response?.data?.user;
259};
260
261const getProfileV2ExtraRequest = async (
262 id: string,

Callers 1

getProfileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected