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

Function withCookie

packages/webapp-next/common/api/user.ts:8–11  ·  view source on GitHub ↗
(ctx?: ServerSideContext)

Source from the content-addressed store, hash-verified

6const USER_API = "/api/user";
7
8const withCookie = (ctx?: ServerSideContext) => {
9 const cookie = ctx?.req?.headers?.cookie;
10 return cookie ? { cookie } : undefined;
11};
12
13const withSetHeaders = (resp: Response, ctx?: ServerSideContext) => {
14 const setCookie = resp.headers.get("set-cookie");

Callers 1

fetchUserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected