-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test: 내가 작성한 리뷰 삭제하는 인수 테스트 작성 * feat: 내가 작성하지 않은 리뷰 삭제 시 예외 처리 구현 * refactor: 리뷰 삭제 시 리뷰 Id로만 리뷰 불러오도록 수정 * test: 내가 작성한 리뷰 수정하는 인수 테스트 작성 * feat: 내가 작성하지 않은 리뷰 수정 시 예외 처리 구현 * test: 리뷰 관련 테스트 추가 * test: 리뷰 관련 테스트 수정 * test: 리뷰 수정 및 삭제 REST Docs 테스트 추가 * feat: 인증 관련 설정 * test: 리뷰 수정 및 삭제 인수테스트 추가 * feat: 리뷰 삭제 시 Soft Delete로 변경 및 테스트 추가
- Loading branch information
Showing
18 changed files
with
402 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
backend/src/main/java/com/woowacourse/moamoa/review/domain/repository/ReviewRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
package com.woowacourse.moamoa.review.domain.repository; | ||
|
||
import com.woowacourse.moamoa.review.domain.AssociatedStudy; | ||
import com.woowacourse.moamoa.review.domain.Review; | ||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
public interface ReviewRepository { | ||
|
||
Review save(Review review); | ||
|
||
Optional<Review> findById(Long id); | ||
|
||
void deleteById(Long id); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...rc/main/java/com/woowacourse/moamoa/review/service/exception/ReviewNotFoundException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.woowacourse.moamoa.review.service.exception; | ||
|
||
import com.woowacourse.moamoa.common.exception.NotFoundException; | ||
|
||
public class ReviewNotFoundException extends NotFoundException { | ||
|
||
public ReviewNotFoundException() { | ||
super("후기를 찾을 수 없습니다."); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...c/main/java/com/woowacourse/moamoa/review/service/exception/UnwrittenReviewException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.woowacourse.moamoa.review.service.exception; | ||
|
||
import com.woowacourse.moamoa.common.exception.BadRequestException; | ||
|
||
public class UnwrittenReviewException extends BadRequestException { | ||
public UnwrittenReviewException() { | ||
|
||
super("내가 작성한 후기가 아닙니다."); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...end/src/main/java/com/woowacourse/moamoa/review/service/request/EditingReviewRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.woowacourse.moamoa.review.service.request; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Getter | ||
public class EditingReviewRequest { | ||
|
||
@NotBlank(message = "내용을 입력해 주세요.") | ||
private String content; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.