Skip to content
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

Merged
merged 3 commits into from
Jan 24, 2024
Merged

Conversation

kdy9960
Copy link
Collaborator

@kdy9960 kdy9960 commented Jan 24, 2024

No description provided.

Copy link
Collaborator

@mixedtape mixedtape left a 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(
Copy link
Member

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));
Copy link
Member

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(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CommonResponse에 반환 타입을 넣어주는게 어떨까요?
예) CommonResponse<Void>
노션 - 코드 컨벤션에 나와있을거에요

@kdy9960 kdy9960 merged commit c9aae1e into dev Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants