diff --git a/app/api/torrents/pirate-bay/route.ts b/app/api/torrents/pirate-bay/route.ts index bb50681..82c7048 100644 --- a/app/api/torrents/pirate-bay/route.ts +++ b/app/api/torrents/pirate-bay/route.ts @@ -22,3 +22,5 @@ export async function GET(request: Request) { return NextResponse.json([]); } } + +export const revalidate = 0; diff --git a/app/api/torrents/tracker/route.ts b/app/api/torrents/tracker/route.ts index 432c8ae..ce9cbc0 100644 --- a/app/api/torrents/tracker/route.ts +++ b/app/api/torrents/tracker/route.ts @@ -30,6 +30,8 @@ export async function GET(request: Request) { return NextResponse.json(torrents); } catch (error) { - return NextResponse.json([]); + return NextResponse.json([{ title: JSON.stringify(error), id: JSON.stringify(error) }]); } } + +export const revalidate = 0; diff --git a/next.config.js b/next.config.js index c9b4fbe..ba35993 100644 --- a/next.config.js +++ b/next.config.js @@ -7,17 +7,6 @@ const nextConfig = { hostname: '**' } ] - }, - future: { - webpack5: true - }, - webpack(config) { - config.resolve.fallback = { - ...config.resolve.fallback, - encoding: false - }; - - return config; } };