diff --git a/src/app/api/auth/route.ts b/src/app/api/auth/route.ts index 57bb071..9d1c071 100644 --- a/src/app/api/auth/route.ts +++ b/src/app/api/auth/route.ts @@ -9,18 +9,14 @@ import { tracking } from '@/libs/tracking' export async function POST(request: Request) { const { loginId, pwd } = await request.json() - const result = await axiosInstance(`${process.env.NEXT_PUBLIC_QSP_API_URL}`).post( - `/api/user/login`, - { - loginId, - pwd, - }, - { - headers: { - referer: process.env.NEXT_PUBLIC_QSP_API_REFERER, - }, - }, - ) + const headers: Record = { + referer: process.env.NEXT_PUBLIC_QSP_API_REFERER || '', + } + + const result = await axiosInstance(`${process.env.NEXT_PUBLIC_QSP_API_URL}`, headers).post(`/api/user/login`, { + loginId, + pwd, + }) console.log('🚀 ~ result ~ result:', result.data) let finalResult = {}