chore: Rename keyServer and extract to helper (#7256)

This commit is contained in:
Pablo Lara
2025-03-17 16:26:27 +01:00
committed by Pepe Fagoaga
parent 84b50f2a3f
commit f559b87018
18 changed files with 68 additions and 238 deletions
+2 -4
View File
@@ -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",