Skip to content

Commit

Permalink
feat: 꿀팁공유해요 스크랩 생성 및 삭제 기능 추가 (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
why-only-english committed Feb 15, 2024
1 parent a856f9a commit 1852ac0
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import com.api.ttoklip.domain.common.report.dto.ReportCreateRequest;
import com.api.ttoklip.domain.common.report.service.ReportService;
import com.api.ttoklip.domain.honeytip.Scrap.service.HoneyTipScrapService;
import com.api.ttoklip.domain.honeytip.comment.domain.HoneyTipComment;
import com.api.ttoklip.domain.honeytip.image.service.HoneyTipImageService;
import com.api.ttoklip.domain.honeytip.like.service.HoneyTipLikeService;
Expand Down Expand Up @@ -37,6 +38,7 @@ public class HoneyTipPostService {
private final HoneyTipUrlService honeyTipUrlService;
private final HoneyTipImageService honeyTipImageService;
private final HoneyTipLikeService honeyTipLikeService;
private final HoneyTipScrapService honeyTipScrapService;
private final HoneyTipCommonService honeyTipCommonService;


Expand Down Expand Up @@ -215,4 +217,18 @@ public Message cancelLike(final Long postId) {
/* -------------------------------------------- 좋아요 추가 & 취소 끝 -------------------------------------------- */


/* -------------------------------------------- 스크랩 추가 & 취소 -------------------------------------------- */
@Transactional
public Message registerScrap(Long postId) {
honeyTipScrapService.registerScrap(postId);
return Message.scrapPostSuccess(HoneyTip.class, postId);
}

@Transactional
public Message cancelScrap(Long postId){
honeyTipScrapService.cancelScrap(postId);
return Message.scrapPostCancel(HoneyTip.class, postId);
}
/* -------------------------------------------- 스크랩 추가 & 취소 끝 -------------------------------------------- */

}

0 comments on commit 1852ac0

Please sign in to comment.