Skip to content

Commit

Permalink
!hotfix: 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kimday0326 committed Jun 6, 2024
1 parent 30b4e19 commit 149727c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public FileGetResponse uploadNewVersionFile(
.url(s3Service.uploadFile(multipartFile))
.version(parentFile.getVersion() + 1)
.isLatest(false) // PR 승인 시 true로 변경되어야 함
.writerId(1L)
.writerId(member.getId())
.workspaceId(parentFile.getWorkspaceId())
.folderId(parentFile.getFolderId())
.rootFileId(parentFile.getRootFileId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void createComment(PullRequestCommentCreateRequest request, Long reviewer
PullRequest pullRequest = pullRequestRepository.findById(pullRequestId)
.orElseThrow(() -> new CustomException(HttpStatus.NOT_FOUND, "해당 pull-request를 찾을 수 없습니다."));
File file = fileService.findFileById(pullRequest.getFileId());
if (file.getWriterId().equals(reviewerId)) {
if (pullRequest.getWriterId().equals(reviewerId)) {
throw new CustomException(HttpStatus.BAD_REQUEST, "본인이 작성한 파일에 대한 pull-request는 승인할 수 없습니다.");
}
if (pullRequestCommentRepository.existsByPullRequestIdAndReviewerId(pullRequestId, reviewerId)) {
Expand Down

0 comments on commit 149727c

Please sign in to comment.