-
Notifications
You must be signed in to change notification settings - Fork 2
[fix/#505] 부모임장 추가에 따른 운동 API 로직 수정 #508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a7e48f3
docs: 운동 API에 부모임장 권한 범위 명시
Dimo-2562 ea8bd21
fix: 운동 수정 및 운동 삭제 API는 부모임장도 사용 가능하도록 변경
Dimo-2562 fa2052e
test: 운동 생성 단위 테스트 추가
Dimo-2562 5e4eca3
test: ExerciseCommandService createExercise 단위 테스트 추가
Dimo-2562 e6f929e
fix: status도 정상적으로 반환하기 위해 ResponseEntity로 응답을 감싸도록 변경
Dimo-2562 5d72c00
test: createExercise 통합 테스트 추가
Dimo-2562 0cd88af
test: ExerciseLifecycleService deleteExercise 단위 테스트 추가
Dimo-2562 a5bfa6c
test: ExerciseCommandService deleteExercise 단위 테스트 추가
Dimo-2562 c0a987e
test: 운동 삭제 통합 테스트 추가
Dimo-2562 25dae49
test: ExerciseLifecycleService 운동 수정 단위 테스트 추가
Dimo-2562 47efaf4
test: ExerciseCommandService updateExercise 단위 테스트 추가
Dimo-2562 e982b28
test: 운동 수정 통합 테스트 추가
Dimo-2562 06c4a30
test: 특정 참여자 운동 취소 단위 테스트 추가
Dimo-2562 f7e0c44
test: 특정 참여자 운동 취소 Command Service 단위 테스트 추가
Dimo-2562 5875b06
test: 특정 참여자 운동 취소 통합 테스트 추가
Dimo-2562 92d4d6c
fix: Builder 어노테이션의 기본값 설정을 위해 Builder.Default 어노테이션 추가
Dimo-2562 13d5b62
test: MemberFixture에 nickname도 설정하도록 변경
Dimo-2562 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| import com.fasterxml.jackson.annotation.JsonInclude; | ||
| import lombok.Builder; | ||
| import lombok.Getter; | ||
| import org.springframework.http.ResponseEntity; | ||
| import umc.cockple.demo.global.response.code.BaseCode; | ||
| import umc.cockple.demo.global.response.code.BaseErrorCode; | ||
| import umc.cockple.demo.global.response.code.status.CommonSuccessCode; | ||
|
|
@@ -84,4 +85,23 @@ public static <T> BaseResponse<T> error(BaseErrorCode errorCode, String customMe | |
| .build(); | ||
| } | ||
|
|
||
| public static <T> ResponseEntity<BaseResponse<T>> of(BaseCode code) { | ||
| return of(code, null); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 아 이렇게 한 번 감싼거구나 !! 좋아요 |
||
| } | ||
|
|
||
| public static <T> ResponseEntity<BaseResponse<T>> of(BaseCode code, T data) { | ||
| ReasonDTO reason = code.getReason(); | ||
|
|
||
| BaseResponse<T> body = BaseResponse.<T>builder() | ||
| .isSuccess(reason.getHttpStatus().is2xxSuccessful()) | ||
| .code(reason.getCode()) | ||
| .message(reason.getMessage()) | ||
| .data(data) | ||
| .build(); | ||
|
|
||
| return ResponseEntity | ||
| .status(reason.getHttpStatus()) | ||
| .body(body); | ||
| } | ||
|
|
||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
감사합니다