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

This commit is contained in:
Pablo Lara authored and Pepe Fagoaga committed 2025-04-09 16:07:30 +02:00
1 parent 84b50f2a3f
commit f559b87018
18 files changed
+68 -238

No files matched your search

+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",