Skip to content

Commit

Permalink
Merge pull request #10 from anoopkarnik/main
Browse files Browse the repository at this point in the history
Corrected docker container ... redirect
  • Loading branch information
anoopkarnik authored Sep 3, 2024
2 parents 913692e + 7931ee5 commit dd3e102
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/dashboard-app/app/api/callback/openai/route.ts
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit dd3e102

Please sign in to comment.