feat: refactor code

This commit is contained in:
shinya
2025-06-29 20:36:03 +08:00
parent 0b0048209f
commit 5c8360d9dd
8 changed files with 40 additions and 95 deletions

View File

@@ -1,6 +1,7 @@
import { NextResponse } from 'next/server';
import { API_CONFIG, ApiSite, getApiSites, getCacheTime } from '@/lib/config';
import { SearchResult } from '@/lib/types';
import { cleanHtmlTags } from '@/lib/utils';
export const runtime = 'edge';
@@ -9,19 +10,6 @@ export const runtime = 'edge';
const MAX_SEARCH_PAGES: number =
Number(process.env.NEXT_PUBLIC_SEARCH_MAX_PAGE) || 5;
export interface SearchResult {
id: string;
title: string;
poster: string;
episodes: string[];
source: string;
source_name: string;
class?: string;
year: string;
desc?: string;
type_name?: string;
}
interface ApiSearchItem {
vod_id: string;
vod_name: string;