From 0f77f718690065f259fe05bfee63f4f188629053 Mon Sep 17 00:00:00 2001 From: sb Date: Sat, 11 Jul 2026 13:58:30 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=82=B0=EC=B1=85=20=EB=A9=94=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8=EC=97=90=EC=84=9C=20=EB=B3=B8=EC=9D=B8=20=EA=B0=95?= =?UTF-8?q?=EC=95=84=EC=A7=80=20=EC=A0=9C=EC=99=B8=20(mates=20=EC=97=90=20?= =?UTF-8?q?userId=20=EC=A0=84=EB=8B=AC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- src/api/spots.ts | 3 ++- src/pages/HomePage.vue | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/api/spots.ts b/src/api/spots.ts index e2acdf6..0a37476 100644 --- a/src/api/spots.ts +++ b/src/api/spots.ts @@ -38,7 +38,8 @@ export interface CheckInResult { export const spotsApi = { list: () => http.get('/api/spots'), - mates: (spotId: number) => http.get(`/api/spots/${spotId}/mates`), + mates: (spotId: number, userId?: number) => + http.get(`/api/spots/${spotId}/mates${userId ? `?userId=${userId}` : ''}`), aiMates: (spotId: number, dogId: number) => http.get(`/api/spots/${spotId}/ai-mates?dogId=${dogId}`), reviews: (spotId: number) => http.get(`/api/spots/${spotId}/reviews`), diff --git a/src/pages/HomePage.vue b/src/pages/HomePage.vue index 8ecbb18..05b7016 100644 --- a/src/pages/HomePage.vue +++ b/src/pages/HomePage.vue @@ -183,7 +183,10 @@ async function onSelectSpot(spotId: number) { } async function refreshSpot(spotId: number) { - const [r, m] = await Promise.all([spotsApi.reviews(spotId), spotsApi.mates(spotId)]) + const [r, m] = await Promise.all([ + spotsApi.reviews(spotId), + spotsApi.mates(spotId, currentUserId()), + ]) reviews.value = r mates.value = m }