Conversation
Summary of ChangesHello @sotogito, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 사용자가 자신의 닉네임을 조회할 수 있는 새로운 기능을 백엔드에 추가합니다. 이는 기존 회원 관리 기능에 닉네임 조회 API를 통합하여 사용자 경험을 개선하고, 관련 테스트 케이스를 통해 기능의 안정성을 보장합니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| public ResponseEntity<String> getNickname( | ||
| @Parameter(hidden = true) @AuthMember final Long memberId | ||
| ) { | ||
| final Member member = memberService.findMemberById(memberId); | ||
|
|
||
| return ResponseEntity.status(HttpStatus.OK).body(member.getNickname()); | ||
| } |
There was a problem hiding this comment.
API 응답의 일관성과 확장성을 위해 원시 문자열(raw string) 대신 JSON 객체를 반환하는 것이 좋습니다. 다른 API(updateNickname 등)들이 JSON을 반환하는 것과 맞추면 클라이언트 측에서 더 일관되게 처리할 수 있습니다.
java.util.Map을 사용하여 간단한 JSON 객체를 생성할 수 있습니다. 아래 제안처럼 FQCN(정규화된 클래스 이름)을 사용하면 별도의 import문 추가 없이 바로 적용 가능하며, 추후 import문을 추가하고 타입을 간소화할 수 있습니다.
또한 ResponseEntity.status(HttpStatus.OK).body(...) 대신 ResponseEntity.ok(...)을 사용하면 코드를 더 간결하게 만들 수 있습니다.
| public ResponseEntity<String> getNickname( | |
| @Parameter(hidden = true) @AuthMember final Long memberId | |
| ) { | |
| final Member member = memberService.findMemberById(memberId); | |
| return ResponseEntity.status(HttpStatus.OK).body(member.getNickname()); | |
| } | |
| public ResponseEntity<java.util.Map<String, String>> getNickname( | |
| @Parameter(hidden = true) @AuthMember final Long memberId | |
| ) { | |
| final Member member = memberService.findMemberById(memberId); | |
| return ResponseEntity.ok(java.util.Map.of("nickname", member.getNickname())); | |
| } |
| final String responseContent = resultActions | ||
| .andExpect(status().isOk()) | ||
| .andReturn() | ||
| .getResponse() | ||
| .getContentAsString(StandardCharsets.UTF_8); | ||
| assertThat(responseContent).isEqualTo(nickname); |
|



✅ PR 타입
반영 브랜치
feat/member-info -> dev
✨ 변경 사항
사용자 이름 반환 api 추가
💯 테스트 결과
📂 관련 이슈
👀 리뷰어에게