Skip to content

Commit

Permalink
feat: 본인 follow 불가 #132
Browse files Browse the repository at this point in the history
  • Loading branch information
seoyeoneel02 committed Sep 27, 2024
1 parent 830e550 commit 4463422
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/domains/search/search.dao.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4463422

Please sign in to comment.