Skip to content

Commit

Permalink
fix : subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
eojinny committed Nov 23, 2023
1 parent 8c731f6 commit 42b11de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public class Member {
private String birth;
private String gender;

// @OneToMany(fetch = FetchType.LAZY)
// private List<Subscribe> subscribeList = new ArrayList<>();
@OneToMany(fetch = FetchType.LAZY)
private List<Subscribe> subscribeList = new ArrayList<>();

public void signUp(SignUpRequest signUpRequest) {
this.nickname = signUpRequest.getNickname();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public SubscribeRes unSubscribe(String socialId, Long topicId, Long issueId) {
Member member = memberQueryService.getMemberBySocialId(socialId);
Subscribe subscribe = subscribeQueryService.findSubscribeByMemberAndTopic(member, topicId,issueId);
subscribeDeleteService.delete(subscribe);
member.getSubscribeList().remove(subscribe);
return subscribeMapper.mapToSubscribeRes(subscribe).setUnScribe(subscribeQueryService.getSubscribers(issueId));
}
}

0 comments on commit 42b11de

Please sign in to comment.