This commit is contained in:
hailin 2025-06-26 00:15:22 +08:00
parent f90c5361ed
commit d4419293fb
1 changed files with 7 additions and 2 deletions

View File

@ -10,6 +10,7 @@ import { getRuntimeEnv } from "@/lib/runtime-env"
//export const runtime: ServerRuntime = "edge"
export const runtime = "nodejs"
export async function POST(request: Request) {
const json = await request.json()
@ -20,10 +21,14 @@ export async function POST(request: Request) {
}
try {
// const supabaseAdmin = createClient<Database>(
// getRuntimeEnv("SUPABASE_URL") ?? "http://localhost:8000",
// process.env.SUPABASE_SERVICE_ROLE_KEY!
// )
const supabaseAdmin = createClient<Database>(
getRuntimeEnv("SUPABASE_URL") ?? "http://localhost:8000",
"http://67.223.119.33:8000", // ⬅️ 硬编码 IP 地址
process.env.SUPABASE_SERVICE_ROLE_KEY!
)
)
const { data: customModel, error } = await supabaseAdmin
.from("models")