Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 17b3f88

Browse files
committed
log: add log
1 parent 98d081e commit 17b3f88

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/api/user.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,18 @@ export async function isLoggedIn(hashedKey?: string) {
3838
return response.loggedIn;
3939
}
4040

41+
console.log("key", hashedKey);
4142
const { headers } = await import("next/headers");
43+
console.log("headers", headers);
4244
const urlStr = headers().get(SITE_INTERNAL_HEADER_URL) as string;
45+
console.log("urlStr", urlStr);
4346
// Propagate cookies to the API route
4447
const headersPropagated = { cookie: headers().get("cookie") as string };
4548
const response = await fetch(new URL("/api/chatgpt/verify", new URL(urlStr)), {
4649
method: "POST",
4750
body: hashedKey ?? undefined,
4851
headers: headersPropagated,
4952
}).then((it) => it.json());
53+
console.log("response", response);
5054
return response.loggedIn;
5155
}

0 commit comments

Comments
 (0)