Skip to content

Commit

Permalink
Merge pull request #121 from Gongjakso/feat/apply
Browse files Browse the repository at this point in the history
fix : apply 상태 수정 중 조건 변경
  • Loading branch information
sycuuui authored Apr 29, 2024
2 parents 2ba4dc3 + aeb3a4b commit 3c5ab02
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ private String decisionState(Apply apply) {
public void updateState(Member member,Long apply_id, ApplyType applyType) {
Apply apply = applyRepository.findById(apply_id).orElseThrow(() -> new ApplicationException(ErrorCode.NOT_FOUND_APPLY_EXCEPTION));
//Check ApplyType
if (apply.getApplyType().equals(ApplyType.NONE) || apply.getApplyType().equals(ApplyType.OPEN_APPLY)) {
if (apply.getApplyType().equals(ApplyType.NOT_PASS) || apply.getApplyType().equals(ApplyType.PASS)) {
throw new ApplicationException(ErrorCode.ALREADY_DECISION_EXCEPION);
}

Expand All @@ -237,8 +237,6 @@ public void updateState(Member member,Long apply_id, ApplyType applyType) {
category.setSize(category.getSize() - 1);
}
}


}

public void updatePostState(Member member,Long post_id, PostStatus postStatus) {
Expand Down

0 comments on commit 3c5ab02

Please sign in to comment.