feat: 강아지 관리 화면 (프로필 CRUD + 댕비티아이 편집)
- dogs 스토어: 내 강아지 로드/등록/수정/삭제, 대표견(currentDog) - ProfilePage: 강아지 등록/선택/삭제, 성향 태그 편집·저장, 회원 티어 표시 - HomePage 체크인/매칭 주체를 대표견으로 전환(미등록 시 안내) - http 클라이언트 put/del 추가, 임시 session 스토어 제거 - 로그아웃 시 강아지 상태 리셋, Dialog 플러그인 등록 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import { http } from './http'
|
||||
|
||||
export interface TraitTag {
|
||||
id: number
|
||||
code: string
|
||||
label: string
|
||||
category: string
|
||||
}
|
||||
|
||||
export interface Dog {
|
||||
id: number
|
||||
name: string
|
||||
breed: string | null
|
||||
birthDate: string | null
|
||||
size: string | null
|
||||
gender: string | null
|
||||
neutered: boolean
|
||||
imageUrl: string | null
|
||||
traits: TraitTag[]
|
||||
}
|
||||
|
||||
export interface DogSaveRequest {
|
||||
name: string
|
||||
breed?: string | null
|
||||
birthDate?: string | null
|
||||
size?: string | null
|
||||
gender?: string | null
|
||||
neutered?: boolean
|
||||
imageUrl?: string | null
|
||||
traitIds?: number[]
|
||||
}
|
||||
|
||||
export const dogsApi = {
|
||||
list: () => http.get<Dog[]>('/api/dogs'),
|
||||
create: (body: DogSaveRequest) => http.post<Dog>('/api/dogs', body),
|
||||
update: (id: number, body: DogSaveRequest) => http.put<Dog>(`/api/dogs/${id}`, body),
|
||||
remove: (id: number) => http.del<void>(`/api/dogs/${id}`),
|
||||
}
|
||||
|
||||
export const traitTagsApi = {
|
||||
list: () => http.get<TraitTag[]>('/api/trait-tags'),
|
||||
}
|
||||
Reference in New Issue
Block a user