log: toloka magnet

This commit is contained in:
ner committed 2024-10-27 11:05:34 +02:00
1 parent 4f4e6b1307
commit 3792e3face
6 files changed
+474 -4

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { NextRequest, NextResponse } from 'next/server';
import tlk from '@/api/parsers/tlk';
export async function GET({ nextUrl: { searchParams } }: NextRequest) {
const url = searchParams.get('url') as string;
try {
return NextResponse.json(await tlk.magnet(url));
} catch (_) {
console.log('error', _);
return NextResponse.json([]);
}
}