feat: 체크인 후 AI 궁합 추천 표시
CI / build (push) Failing after 13m34s

체크인 성공 시 /api/spots/{id}/ai-mates 를 호출해 사이좋게 지낼 만한
강아지를 궁합점수·이유와 함께 표시. 로딩 스피너·빈 상태 처리 포함.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
sb
2026-07-11 13:44:46 +09:00
parent 0e69218710
commit 56255c0ae6
2 changed files with 63 additions and 1 deletions
+10
View File
@@ -14,6 +14,14 @@ export interface Mate {
breed: string | null
}
export interface AiMate {
dogId: number
name: string
breed: string | null
score: number
reason: string
}
export interface Review {
id: number
tag: string | null
@@ -31,6 +39,8 @@ export interface CheckInResult {
export const spotsApi = {
list: () => http.get<Spot[]>('/api/spots'),
mates: (spotId: number) => http.get<Mate[]>(`/api/spots/${spotId}/mates`),
aiMates: (spotId: number, dogId: number) =>
http.get<AiMate[]>(`/api/spots/${spotId}/ai-mates?dogId=${dogId}`),
reviews: (spotId: number) => http.get<Review[]>(`/api/spots/${spotId}/reviews`),
checkIn: (spotId: number, userId: number, dogId: number) =>
http.post<CheckInResult>(`/api/spots/${spotId}/checkins`, { userId, dogId }),