Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
fix : 탈퇴한 회원은 검색 결과에서 제외 (#225)
Browse files Browse the repository at this point in the history
탈퇴 여부 확인 추가
  • Loading branch information
yewonahn committed Feb 15, 2024
2 parents 7d8b0dc + e0be67b commit 7928476
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/follow/follow.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export class FollowService {
try {
// 검증1) 사용자가 존재하지 않는 경우
const userEntity = await UserEntity.findOne({
where: {id: userId},
where: {
id: userId,
isQuit: false,
},
});
if (!userEntity) throw new Error('사용자를 찾을 수 없습니다');

Expand Down
10 changes: 8 additions & 2 deletions src/rule/rule.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,10 @@ export class RuleService {
try {
// 검증1) 사용자가 존재하지 않는 경우
const user = await UserEntity.findOne({
where: {id: userId},
where: {
id: userId,
isQuit: false,
},
});
if (!user) throw new Error('사용자를 찾을 수 없습니다');

Expand Down Expand Up @@ -547,7 +550,10 @@ export class RuleService {
try {
// 검증1) 사용자가 존재하지 않는 경우
const user = await UserEntity.findOne({
where: {id: userId},
where: {
id: userId,
isQuit: false,
},
});
if (!user) throw new Error('사용자를 찾을 수 없습니다');
// 검증2) 규칙이 존재하지 않는 경우
Expand Down

0 comments on commit 7928476

Please sign in to comment.