MCPcopy Create free account
hub / github.com/codicocodes/speedtyper.dev / fetchUser

Function fetchUser

packages/webapp-next/common/api/user.ts:21–28  ·  view source on GitHub ↗
(context?: ServerSideContext)

Source from the content-addressed store, hash-verified

19};
20
21export const fetchUser = async (context?: ServerSideContext) => {
22 const serverUrl = getExperimentalServerUrl();
23 const url = serverUrl + USER_API;
24 return fetch(url, {
25 credentials: "include",
26 headers: withCookie(context),
27 }).then((resp) => withSetHeaders(resp, context).json());
28};
29
30export const fetchUser2 = async () => {
31 const serverUrl = getExperimentalServerUrl();

Callers 2

updateUserInStoreFunction · 0.90
logoutFunction · 0.90

Calls 3

getExperimentalServerUrlFunction · 0.90
withCookieFunction · 0.85
withSetHeadersFunction · 0.85

Tested by

no test coverage detected