mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +00:00
chore: Rename keyServer and extract to helper (#7256)
This commit is contained in:
@@ -3,13 +3,11 @@
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
import { signIn } from "@/auth.config";
|
||||
import { baseUrl } from "@/lib/helper";
|
||||
import { apiBaseUrl, baseUrl } from "@/lib/helper";
|
||||
|
||||
export async function GET(req: Request) {
|
||||
const { searchParams } = new URL(req.url);
|
||||
|
||||
const keyServer = process.env.API_BASE_URL;
|
||||
|
||||
const code = searchParams.get("code");
|
||||
|
||||
const params = new URLSearchParams();
|
||||
@@ -23,7 +21,7 @@ export async function GET(req: Request) {
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await fetch(`${keyServer}/tokens/github`, {
|
||||
const response = await fetch(`${apiBaseUrl}/tokens/github`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
|
||||
Reference in New Issue
Block a user