Преглед на файлове

fix: correct typo in variable name from ALLOWD_PATH to ALLOWED_PATH

little_huang преди 1 година
родител
ревизия
cd75461f9e
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      app/api/openai.ts

+ 2 - 2
app/api/openai.ts

@@ -6,7 +6,7 @@ import { NextRequest, NextResponse } from "next/server";
 import { auth } from "./auth";
 import { requestOpenai } from "./common";
 
-const ALLOWD_PATH = new Set(Object.values(OpenaiPath));
+const ALLOWED_PATH = new Set(Object.values(OpenaiPath));
 
 function getModels(remoteModelRes: OpenAIListModelResponse) {
   const config = getServerSideConfig();
@@ -34,7 +34,7 @@ export async function handle(
 
   const subpath = params.path.join("/");
 
-  if (!ALLOWD_PATH.has(subpath)) {
+  if (!ALLOWED_PATH.has(subpath)) {
     console.log("[OpenAI Route] forbidden path ", subpath);
     return NextResponse.json(
       {