From 1a336aedc93faf1673d2205527a6f3ee570c5ff7 Mon Sep 17 00:00:00 2001 From: dongree Date: Tue, 5 Sep 2023 23:24:49 +0900 Subject: [PATCH] =?UTF-8?q?get=20comment=20headers=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?(=ED=85=8C=EC=8A=A4=ED=8A=B8=EC=9A=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/comments.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/service/comments.ts b/src/service/comments.ts index 5aa29274..02bffa91 100644 --- a/src/service/comments.ts +++ b/src/service/comments.ts @@ -1,3 +1,4 @@ +import { cookies } from 'next/headers'; import { PostType } from '@/types'; import { Comment, PostCommentData, PostRecoomentData } from '@/types/comment'; @@ -10,6 +11,7 @@ export async function getCommentsByPostTypeAndPostId( { credentials: 'include', next: { revalidate: 0 }, + headers: { Cookie: `accessToken=${cookies().get('accessToken')}` }, } ) .then((res) => {