From 7931ee5ea86453db4170cdae982a07d2a464e370 Mon Sep 17 00:00:00 2001 From: anoopkarnik Date: Tue, 3 Sep 2024 22:01:18 +0530 Subject: [PATCH] Corrected docker container ... redirect --- apps/dashboard-app/app/api/callback/openai/route.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/dashboard-app/app/api/callback/openai/route.ts b/apps/dashboard-app/app/api/callback/openai/route.ts index 324ffa2..a3847e7 100644 --- a/apps/dashboard-app/app/api/callback/openai/route.ts +++ b/apps/dashboard-app/app/api/callback/openai/route.ts @@ -1,14 +1,14 @@ +import { redirect } from 'next/navigation'; import { NextRequest, NextResponse } from 'next/server'; export async function GET(req: NextRequest) { const apiKey = req.nextUrl.searchParams.get('apiKey'); const type = 'OpenAI'; const redirectUrl = apiKey - ? `${ process.env.NEXT_PUBLIC_URL}/connections?apiKey=${apiKey}&type=${type}` - : `${ process.env.NEXT_PUBLIC_URL}/sconnections`; + ? `/connections?apiKey=${apiKey}&type=${type}` + : `/sconnections`; console.log('Redirect URL:', redirectUrl); console.log('NEXT_PUBLIC_URL:', process.env.NEXT_PUBLIC_URL); - - return NextResponse.redirect(redirectUrl); + redirect(redirectUrl); }