Skip to content

Commit

Permalink
chore: admin 헤더 관련 로직 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
ghdtjgus76 committed Aug 18, 2024
1 parent f1b8889 commit 6f1c2f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
9 changes: 1 addition & 8 deletions apps/admin/apis/auth/dashboardApi.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
import { fetcher } from "@wow-class/utils";
import { apiPath } from "constants/apiPath";
import { tags } from "constants/tags";
import { cookies } from "next/headers";
import type { DashboardApiResponseDto } from "types/dto/auth";
import type { DashboardApiResponseDto } from "types/dtos/auth";

export const dashboardApi = {
getDashboardInfo: async () => {
const cookieStore = cookies();
const accessToken = cookieStore.get("accessToken")?.value;

const response = await fetcher.get<DashboardApiResponseDto>(
apiPath.dashboard,
{
next: { tags: [tags.dashboard] },
headers: {
Authorization: `Bearer ${accessToken}`,
},
}
);

Expand Down
5 changes: 1 addition & 4 deletions apps/admin/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@ const middleware = async (req: NextRequest) => {

return NextResponse.redirect(new URL("/auth", url));
}
const response = NextResponse.next();

response.headers.set("Authorization", `Bearer ${accessToken}`);

return response;
return NextResponse.next();
};

export default middleware;

0 comments on commit 6f1c2f3

Please sign in to comment.