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: ServerRuntime = "edge"
export const runtime = "nodejs"
export async function POST(request: Request) { export async function POST(request: Request) {
const json = await request.json() const json = await request.json()
@ -20,8 +21,12 @@ export async function POST(request: Request) {
} }
try { try {
// const supabaseAdmin = createClient<Database>(
// getRuntimeEnv("SUPABASE_URL") ?? "http://localhost:8000",
// process.env.SUPABASE_SERVICE_ROLE_KEY!
// )
const supabaseAdmin = createClient<Database>( const supabaseAdmin = createClient<Database>(
getRuntimeEnv("SUPABASE_URL") ?? "http://localhost:8000", "http://67.223.119.33:8000", // ⬅️ 硬编码 IP 地址
process.env.SUPABASE_SERVICE_ROLE_KEY! process.env.SUPABASE_SERVICE_ROLE_KEY!
) )