mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-02-15 12:24:41 +08:00
18 lines
477 B
TypeScript
18 lines
477 B
TypeScript
import { NextRequest, NextResponse } from 'next/server';
|
|
|
|
import { getAvailableApiSites, getCacheTime } from '@/lib/config';
|
|
|
|
export const runtime = 'edge';
|
|
|
|
// OrionTV 兼容接口
|
|
export async function GET(request: NextRequest) {
|
|
console.log('request', request.url);
|
|
try {
|
|
const apiSites = await getAvailableApiSites();
|
|
|
|
return NextResponse.json(apiSites);
|
|
} catch (error) {
|
|
return NextResponse.json({ error: '获取资源失败' }, { status: 500 });
|
|
}
|
|
}
|