diff --git a/src/main/java/com/example/oneul/domain/post/service/command/PostCommnadServiceImpl.java b/src/main/java/com/example/oneul/domain/post/service/command/PostCommnadServiceImpl.java index 628a1fd..df83a63 100644 --- a/src/main/java/com/example/oneul/domain/post/service/command/PostCommnadServiceImpl.java +++ b/src/main/java/com/example/oneul/domain/post/service/command/PostCommnadServiceImpl.java @@ -40,6 +40,7 @@ public class PostCommnadServiceImpl implements PostCommandService{ @Override public Post updatePost(Long id, Post post, HttpSession httpSession){ UserEntity userEntity = (UserEntity) httpSession.getAttribute("user"); + // TODO: 적절한 방법인지 확인하기 Post postEntity = postCommandRepository.findByIdAndWriter(id, userEntity).orElseThrow(() -> new NotFoundException(id + " post not found")); postEntity.setConent(post.getContent()); postEntity = postCommandRepository.save(postEntity);