Skip to content

Commit

Permalink
fix: correct typo in variable name from ALLOWD_PATH to ALLOWED_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
little-huang authored Oct 7, 2024
1 parent 2bac174 commit cd75461
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/api/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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(
{
Expand Down

0 comments on commit cd75461

Please sign in to comment.