[NDD-178]: 회원 이름 반환 시 DTO로 반환하도록 변경 (0.3h / 1h) #63
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.
Why
Response의 형태가 반드시 JSON의 형태여야 FE에서의 추가적인 설정이 필요없다는 얘기가 나와서 이를 반영하기 위해 로직 변경
How
원래 string으로 바로 반환했던 로직을 FE의 요청에 맞추어, MemberNicknameResponse라는 객체를 반환하도록 변경하여 최종적으로 JSON 형태의 응답을 FE가 받을 수 있도록 하였다.
Result
아래 사진처럼 응답이 JSON 형태로 넘어옴을 확인할 수 있다.
Prize
모든 응답을 JSON으로 통일함으로써 FE에서의 추가적인 작업을 방지