Spaces:
Build error
Build error
Download lib/anon-id.ts from Jacksuyu/requestsolution: direct link, hf CLI and curl.
- Browser
- Download file 274 Bytes
-
https://huggingface.co/spaces/Jacksuyu/requestsolution/resolve/main/lib/anon-id.ts
- Command line
-
hf download hf://spaces/Jacksuyu/requestsolution/lib/anon-id.ts
-
curl -L -o anon-id.ts https://huggingface.co/spaces/Jacksuyu/requestsolution/resolve/main/lib/anon-id.ts
274 Bytes
| import { cookies } from "next/headers"; | |
| export async function getAnonId(): Promise<string> { | |
| const cookieStore = await cookies(); | |
| const anonId = cookieStore.get("anon_id")?.value; | |
| if (!anonId) { | |
| throw new Error("anon_id cookie not found"); | |
| } | |
| return anonId; | |
| } | |