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

This commit is contained in:
Pablo Lara authored and GitHub committed 2025-03-17 21:11:27 +05:45
1 parent f6aa56d92b
commit d5be35af49
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",