✨ 반려동물 수정/삭제 API 및 사용자 설정 이름 반환 API #121
Merged
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.
작업 이유
작업 사항
1️⃣ 기존 반려동물 API url 변경 (
/users/{user_id}
제거)/api/v2/users/{user_id}/pets
→/api/v2/pets
/api/v2/users/{user_id}/pets/summary
→/api/v2/pets/summary
/api/v2/users/{user_id}/pets
→/api/v2/pets
2️⃣ 반려동물 요약 정보 리스트 조회 시,
imageUrl
null 반환 변경3️⃣ 사용자 설정 이름 반환
GET /api/v2/accounts/{user_id}/name
user_id
: 조회하려는 user의 pk4️⃣ 반려동물 정보 조회 (수정 뷰 전용)
GET /api/v2/pets/{pet_id}
🟡 예시 응답
5️⃣ 반려동물 정보 수정
요청:
PUT /api/v2/pets/{pet_id}
feed
와profileImg
은 없으면 null을 허용합니다. (없으면 필드를 아예 제외하거나 null 송신. 빈 문자열 보내지 말 것)반려동물 생성과 완전 동일한 요청 포맷이라 어렵지 않으실 거예요.
🟡 예시 응답
6️⃣ 반려동물 삭제
DELETE /api/v2/pets/{pet_id}
이슈 연결
close #105