From a10f2b6bec0a8682da3c7ff715eb9fb1d4f04d9a Mon Sep 17 00:00:00 2001 From: choisohyun Date: Sat, 30 Jul 2022 15:10:09 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=97=B0=EB=A0=B9=EB=8C=80=20api=20?= =?UTF-8?q?=ED=98=B8=EC=B6=9C=20=EC=8B=9C=20type=20params=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/api/oauth.ts | 4 ++-- src/pages/AgreementSurvey.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/api/oauth.ts b/src/lib/api/oauth.ts index 9fee00b..f45e697 100644 --- a/src/lib/api/oauth.ts +++ b/src/lib/api/oauth.ts @@ -1,6 +1,6 @@ import apiClient from '@/lib/api/index'; -export const getOauthKakaoAge = async (params: { code: string }) => { - const res = await apiClient.get(`/oauth/kakao/age&code=${params.code}`); +export const getOauthKakaoAge = async (params: { code: string; type: 'dating' | 'meeting' }) => { + const res = await apiClient.get(`/oauth/kakao/age&code=${params.code}?type=${params.type}`); return res.data; }; diff --git a/src/pages/AgreementSurvey.tsx b/src/pages/AgreementSurvey.tsx index 7066a2a..93aed0b 100644 --- a/src/pages/AgreementSurvey.tsx +++ b/src/pages/AgreementSurvey.tsx @@ -25,7 +25,7 @@ const AgreementSurvey = () => { const searchParams = new URLSearchParams(location.search); const code = searchParams.get('code') ?? ''; - getOauthKakaoAge({ code }) + getOauthKakaoAge({ code, type: matchMeeting ? 'meeting' : 'dating' }) .then((response) => { console.log(response); meetingNavigate(Path.KakaoIdSurvey);