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);