Skip to content

Commit 66c9bf6

Browse files
committed
fix: reissue 로그 추가
1 parent 1d14ad3 commit 66c9bf6

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

apps/ticket/src/app/api/reissue/route.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@ import { NextResponse } from "next/server";
33
import { API_URL } from "@/data/constants";
44

55
export async function POST(req: Request) {
6-
const body = await req.json();
7-
86
const apiRes = await fetch(
97
process.env.NEXT_PUBLIC_TICKET_API_BASE_URL + API_URL.USER.REISSUE_ACCESS_TOKEN,
108
{
119
method: "POST",
1210
headers: { "Content-Type": "application/json" },
13-
body: JSON.stringify(body),
1411
credentials: "include",
1512
},
1613
);

apps/ticket/src/shared/components/AuthErrorFallback/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@ export const AuthErrorFallback = () => {
99

1010
useEffect(() => {
1111
const tokenReissue = async () => {
12-
await fetch("/api/reissue", {
12+
const res = await fetch("/api/reissue", {
1313
method: "POST",
1414
headers: {
1515
"Content-Type": "application/json",
1616
},
1717
credentials: "include",
1818
});
1919

20+
console.log("@@ reissue", res, JSON.stringify(res));
21+
2022
// 토큰 재발급 후 reload()
21-
window.location.reload();
23+
// window.location.reload();
2224
};
2325

2426
tokenReissue();

0 commit comments

Comments
 (0)