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

Commit 9314422

Browse files
committed
log: more logs
1 parent 647a4ce commit 9314422

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/api/user.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export async function isLoggedIn(hashedKey?: string) {
4949
method: "POST",
5050
body: hashedKey ?? "NOPE",
5151
headers: headersPropagated,
52+
redirect: "follow",
5253
}).then((it) => it.json());
5354
console.log("response", response);
5455
return response.loggedIn;

src/app/[lang]/chatgpt/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ import * as UserAPI from "@/api/user";
88

99
export default async function ChatGPTPage() {
1010
const hashedKey = cookies().get(SITE_USER_COOKIE)?.value as string;
11+
console.log("hashedKey", hashedKey)
12+
console.log("cookes", cookies().getAll())
1113

1214
let isLoggedin = false;
1315
try {
1416
isLoggedin = await UserAPI.isLoggedIn(hashedKey);
1517
} catch (e) {
16-
console.error(e);
18+
console.error(e)
1719
isLoggedin = false;
1820
}
1921

0 commit comments

Comments
 (0)