Skip to content

Commit

Permalink
feat: Add CommentsRepository import (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahyun0326 committed Mar 19, 2024
1 parent 99e66b3 commit be9df95
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.beotkkot.qtudy.dto.request.posts.PostsRequestDto;
import com.beotkkot.qtudy.dto.response.*;
import com.beotkkot.qtudy.dto.response.posts.*;
import com.beotkkot.qtudy.repository.comments.CommentsRepository;
import com.beotkkot.qtudy.repository.posts.PostsRepository;
import com.beotkkot.qtudy.repository.scrap.ScrapRepository;
import com.beotkkot.qtudy.repository.tags.TagsRepository;
Expand Down Expand Up @@ -211,7 +212,7 @@ public ResponseEntity<? super PostsResponseDto> deletePost(Long postId, Long kak
if (!isWriter) return PostsResponseDto.noPermission();

scrapRepo.deleteByPostId(postId);
commentRepo.deleteByPostId(postId);
commentsRepo.deleteByPostId(postId);

// 관련된 hash tag -1
List<String> tagNameList = Arrays.asList(post.getTag().split("\\s*,\\s*"));
Expand Down

0 comments on commit be9df95

Please sign in to comment.