diff --git a/src/app/api/detail/route.ts b/src/app/api/detail/route.ts index 16fe971..598114d 100644 --- a/src/app/api/detail/route.ts +++ b/src/app/api/detail/route.ts @@ -185,7 +185,7 @@ async function getVideoDetail( return getDetailFromApi(apiSite, id); } -export const runtime = process.env.DOCKER_ENV === 'true' ? 'node' : 'edge'; +export const runtime = process.env.DOCKER_ENV === 'true' ? 'nodejs' : 'edge'; export async function GET(request: Request) { const { searchParams } = new URL(request.url); diff --git a/src/app/api/douban/route.ts b/src/app/api/douban/route.ts index b2d0844..7ecb1d8 100644 --- a/src/app/api/douban/route.ts +++ b/src/app/api/douban/route.ts @@ -43,7 +43,7 @@ async function fetchDoubanData(url: string): Promise { } } -export const runtime = process.env.DOCKER_ENV === 'true' ? 'node' : 'edge'; +export const runtime = process.env.DOCKER_ENV === 'true' ? 'nodejs' : 'edge'; export async function GET(request: Request) { const { searchParams } = new URL(request.url); diff --git a/src/app/api/login/route.ts b/src/app/api/login/route.ts index 269845b..5c67356 100644 --- a/src/app/api/login/route.ts +++ b/src/app/api/login/route.ts @@ -1,6 +1,6 @@ import { NextRequest, NextResponse } from 'next/server'; -export const runtime = process.env.DOCKER_ENV === 'true' ? 'node' : 'edge'; +export const runtime = process.env.DOCKER_ENV === 'true' ? 'nodejs' : 'edge'; export async function POST(req: NextRequest) { try { diff --git a/src/app/api/playrecords/route.ts b/src/app/api/playrecords/route.ts index c11cb4a..481f735 100644 --- a/src/app/api/playrecords/route.ts +++ b/src/app/api/playrecords/route.ts @@ -5,7 +5,7 @@ import { NextRequest, NextResponse } from 'next/server'; import { db } from '@/lib/db'; import { PlayRecord } from '@/lib/db'; -export const runtime = process.env.DOCKER_ENV === 'true' ? 'node' : 'edge'; +export const runtime = process.env.DOCKER_ENV === 'true' ? 'nodejs' : 'edge'; export async function GET() { try { diff --git a/src/app/api/search/route.ts b/src/app/api/search/route.ts index 8a393d6..cdd0e7d 100644 --- a/src/app/api/search/route.ts +++ b/src/app/api/search/route.ts @@ -4,7 +4,7 @@ import { API_CONFIG, ApiSite, getApiSites, getCacheTime } from '@/lib/config'; import { SearchResult } from '@/lib/types'; import { cleanHtmlTags } from '@/lib/utils'; -export const runtime = process.env.DOCKER_ENV === 'true' ? 'node' : 'edge'; +export const runtime = process.env.DOCKER_ENV === 'true' ? 'nodejs' : 'edge'; // 根据环境变量决定最大搜索页数,默认 5 const MAX_SEARCH_PAGES: number =