From cd75461f9e215f6e3140e36359d138dc096abe99 Mon Sep 17 00:00:00 2001 From: little_huang <53588889+little-huang@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:30:25 +0800 Subject: [PATCH] fix: correct typo in variable name from ALLOWD_PATH to ALLOWED_PATH --- app/api/openai.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/openai.ts b/app/api/openai.ts index 7dfd84e1785..bbba69e569c 100644 --- a/app/api/openai.ts +++ b/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( {