From edf74fc92cc800f770c89df3332f0fc4282059f0 Mon Sep 17 00:00:00 2001 From: ner Date: Fri, 11 Aug 2023 15:41:20 +0300 Subject: [PATCH] fix: removed revalidate --- app/api/torrents/pirate-bay/route.ts | 2 ++ app/api/torrents/tracker/route.ts | 4 +++- next.config.js | 11 ----------- 3 files changed, 5 insertions(+), 12 deletions(-) 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; } };