merge upstream

This commit is contained in:
sijinhui
2023-12-27 22:55:28 +08:00
parent 19f4ef9194
commit 1e7d20580d
6 changed files with 89 additions and 82 deletions

View File

@@ -1,5 +1,6 @@
import { NextRequest, NextResponse } from "next/server";
import { auth } from "@/app/api/auth";
import { ModelProvider } from "@/app/constant";
const BASE_URL = process.env.MIDJOURNEY_PROXY_URL ?? null;
const MIDJOURNEY_PROXY_KEY = process.env.MIDJOURNEY_PROXY_KEY ?? null;
@@ -40,7 +41,7 @@ async function handle(
jsonBody = {};
}
const authResult = auth(req);
const authResult = auth(req, ModelProvider.GPT);
// if (authResult.error) {
// return NextResponse.json(authResult, {
// status: 401,