From 2077ffa9e710066451b6f6b84e3ff33f4858b977 Mon Sep 17 00:00:00 2001 From: alarv Date: Fri, 27 Sep 2024 12:54:38 +0300 Subject: [PATCH] fix: api url --- app/api/auth/validate/route.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/api/auth/validate/route.ts b/app/api/auth/validate/route.ts index b983aea..0c59f04 100644 --- a/app/api/auth/validate/route.ts +++ b/app/api/auth/validate/route.ts @@ -17,12 +17,15 @@ export async function GET( 401, ); } - const res = await fetch(`${process.env.API_URL}/v1/auth/validate`, { - headers: { - Authorization: `Bearer ${session!.token}`, - 'Content-Type': 'application/json', + const res = await fetch( + `${process.env.NEXT_PUBLIC_API_URL}/v1/auth/validate`, + { + headers: { + Authorization: `Bearer ${session!.token}`, + 'Content-Type': 'application/json', + }, }, - }); + ); return handleApiResponse(res); }