From 62299a4fd16a3ea15b5e72ecd770b4eed83ad003 Mon Sep 17 00:00:00 2001 From: yubinquitous <65652094+yubinquitous@users.noreply.github.com> Date: Tue, 25 Jun 2024 13:10:37 +0900 Subject: [PATCH] =?UTF-8?q?[FIX]=20=EC=BB=A4=EB=AE=A4=EB=8B=88=ED=8B=B0=20?= =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EB=AC=BC=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=EB=B3=84=20=EC=A1=B0=ED=9A=8C=20response=EC=97=90=20?= =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EB=AC=BC=20=EC=9E=91=EC=84=B1=EC=9E=90=20?= =?UTF-8?q?=EB=B3=B8=EC=9D=B8=EC=97=AC=EB=B6=80=20bool=20=ED=83=80?= =?UTF-8?q?=EC=9E=85=20=EC=B6=94=EA=B0=80=20(#360)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions/db/community.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/db/community.js b/functions/db/community.js index 0829934..0fce81d 100644 --- a/functions/db/community.js +++ b/functions/db/community.js @@ -157,7 +157,8 @@ const getCommunityCategoryPostsById = async ( ) => { const { rows } = await client.query( ` - SELECT cp.id, u.nickname, cp.title, cp.body, cp.content_url, cp.content_title, cp.content_description, cp.thumbnail_url, cp.created_at + SELECT cp.id, u.nickname, cp.title, cp.body, cp.content_url, cp.content_title, cp.content_description, cp.thumbnail_url, cp.created_at, + CASE WHEN cp.user_id = $1 THEN TRUE ELSE FALSE END as is_author FROM community_post cp JOIN "user" u ON cp.user_id = u.id JOIN community_category_post ccp ON cp.id = ccp.community_post_id