From 44634227fa100f795888b50e25524d7b23a637a0 Mon Sep 17 00:00:00 2001 From: seoyeoneel02 Date: Fri, 27 Sep 2024 16:18:00 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=B3=B8=EC=9D=B8=20follow=20=EB=B6=88?= =?UTF-8?q?=EA=B0=80=20#132?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/domains/search/search.dao.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/domains/search/search.dao.js b/src/domains/search/search.dao.js index 121c97e..fd22a3a 100644 --- a/src/domains/search/search.dao.js +++ b/src/domains/search/search.dao.js @@ -276,6 +276,9 @@ export const addFollowDAO = async (userId, clothId) => { try{ const conn = await pool.getConnection(); const to_user = await pool.query(getUserIdToClothId, clothId); + if(userId == to_user[0][0].uuid){ + throw new BaseError(status.PARAMETER_IS_WRONG); + } const is_exist = await pool.query(getFollowSQL, [userId, to_user[0][0].uuid]); if(is_exist[0].length !== 0){ throw new BaseError(status.PARAMETER_IS_WRONG);