Skip to content

Commit

Permalink
feat: 리뷰 삭제 mock api 추가 #347
Browse files Browse the repository at this point in the history
  • Loading branch information
imdaxsz committed Dec 28, 2023
1 parent 977200b commit d83a2f5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/features/reviews/api/review.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ export default class ReviewApi {
return patch(`/short-reviews/${reviewId}`, review);
}

/** @description 리뷰 삭제 요청 */
async deleteReview(reviewId: number) {
return Promise.resolve(console.log(`${reviewId} 삭제완료`));
// TODO: 실제 api 반영
// return del(`/short-reviews/${reviewId}`);
}

/** @description 리뷰 좋아요 추가/삭제 */
async toggleReviewLike(shortReviewId: number): Promise<void> {
return post(`/likes`, { shortReviewId });
Expand Down Expand Up @@ -77,6 +84,7 @@ export default class ReviewApi {
cursor: pageParam,
...baseParams,
};
// return Promise.reject(new Error("fail"));
return get<CursorPage<ReviewInfo>>(`/short-reviews/animes/${animeId}`, {
params,
});
Expand Down

0 comments on commit d83a2f5

Please sign in to comment.