log: toloka magnet
This commit is contained in:
1 parent
4f4e6b1307
commit
3792e3face
6 files changed
+474
-4
No files matched your search
@@ -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([]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user