Skip to content

Commit

Permalink
Merge branch '123-bug-thesis-exception' into qa
Browse files Browse the repository at this point in the history
  • Loading branch information
jcy0308 committed May 8, 2024
2 parents 96fbe27 + e401ff9 commit 054aac8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/modules/reviews/reviews.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1082,10 +1082,13 @@ export class ReviewsService {
thesisInfoId: foundReview.thesisInfoId,
},
});
const submitted = otherReviews.filter((review) => {
return review.contentStatus == Status.FAIL || review.contentStatus == Status.PASS;
const notSubmitted = otherReviews.filter((review) => {
if (review.contentStatus == Status.FAIL || review.contentStatus == Status.PASS) {
return false;
}
return true;
});
if (submitted.length != 0) throw new BadRequestException("심사가 완료되지 않았습니다.");
if (notSubmitted.length != 0) throw new BadRequestException("심사가 완료되지 않았습니다.");
if (!foundReview) throw new NotFoundException("존재하지 않는 심사정보입니다");
if (userType == UserType.PROFESSOR) {
if (foundReview.reviewerId != userId) throw new BadRequestException("본인의 논문 심사가 아닙니다.");
Expand Down

0 comments on commit 054aac8

Please sign in to comment.