Skip to content

Commit

Permalink
#273 [fix] error해결
Browse files Browse the repository at this point in the history
  • Loading branch information
parkheeddong committed Apr 3, 2024
1 parent a7b925d commit 83169a9
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 @@ -24,5 +24,5 @@ public interface WriterNameRepository extends JpaRepository<WriterName, Long> {
List<WriterName> findTop2ByMoimIdAndTotalCuriousCountGreaterThanOrderByTotalCuriousCountDesc(final Long moimId, final int totalCuriousCount);
Page<WriterName> findByMoimIdOrderByIdDesc(Long moimId, Pageable pageable);

Optional<WriterName> getById(final Long id);
Optional<WriterName> findById(final Long id);
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public Long createWriterName(final User user, final Moim moim, final WriterMembe
}

public WriterName getById(final Long writerNameId) {
return writerNameRepository.getById(writerNameId)
return writerNameRepository.findById(writerNameId)
.orElseThrow(
() -> new NotFoundException(ErrorMessage.WRITER_NOT_FOUND)
);
Expand Down

0 comments on commit 83169a9

Please sign in to comment.