-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature/hive 하이브 카테고리 별 조회기능 구현 #100
Conversation
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.
고생하셨습니다!
@@ -70,7 +72,18 @@ public ResponseEntity<CommonResponse> gethives() { | |||
.body(new CommonResponse<>(200, "하이브들이 조회되었습니다.", responses)); | |||
} | |||
|
|||
@PatchMapping("{hive_id}") | |||
@GetMapping("/search") | |||
public ResponseEntity<CommonResponse> getHivesByCategory( |
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.
CommonResponse에 반환 타입을 넣어주는게 어떨까요?
예) CommonResponse<Void>
노션 - 코드 컨벤션에 나와있을거에요
List<HiveResponseDTO> responses = hiveService.getHivesByCategory( | ||
MajorCategory.findByStringName(majorCategory), SubCategory.findByStringName(subCategory)); | ||
return ResponseEntity.ok() | ||
.body(new CommonResponse<>(200, "하이브들이 조회되었습니다.", responses)); |
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.
200 대신 HttpStatus로 수정해주시면 더 좋을 듯 합니다
- 예시
return ResponseEntity.ok() .body(CommonResponse.of(HttpStatus.OK.value(), "카테고리 설정 성공", response));
} | ||
|
||
|
||
@DeleteMapping("{hive_id}") | ||
public ResponseEntity<CommonResponse> deleteHive( |
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.
CommonResponse에 반환 타입을 넣어주는게 어떨까요?
예) CommonResponse<Void>
노션 - 코드 컨벤션에 나와있을거에요
No description provided.