From f7f7d01f44010b1ff60550aafcbd11a7f50bb08c Mon Sep 17 00:00:00 2001 From: Anchel135 Date: Thu, 28 Nov 2024 16:32:24 +0200 Subject: [PATCH] remove cache from all fetch to code-graph-backend --- app/api/chat/[graph]/route.ts | 3 ++- app/api/repo/[graph]/[node]/route.ts | 3 ++- app/api/repo/[graph]/commit/route.ts | 3 ++- app/api/repo/[graph]/info/route.ts | 3 ++- app/api/repo/[graph]/neighbors/route.ts | 3 ++- app/api/repo/[graph]/route.ts | 3 ++- app/api/repo/route.ts | 6 ++++-- 7 files changed, 16 insertions(+), 8 deletions(-) diff --git a/app/api/chat/[graph]/route.ts b/app/api/chat/[graph]/route.ts index 18d4acf6..16240ec6 100644 --- a/app/api/chat/[graph]/route.ts +++ b/app/api/chat/[graph]/route.ts @@ -13,7 +13,8 @@ export async function POST(request: NextRequest, { params }: { params: { graph: headers: { "Authorization": process.env.SECRET_TOKEN!, "Content-Type": 'application/json' - } + }, + cache: 'no-store' }) if (!result.ok) { diff --git a/app/api/repo/[graph]/[node]/route.ts b/app/api/repo/[graph]/[node]/route.ts index 6dea47f0..73074031 100644 --- a/app/api/repo/[graph]/[node]/route.ts +++ b/app/api/repo/[graph]/[node]/route.ts @@ -18,7 +18,8 @@ export async function POST(request: NextRequest, { params }: { params: { graph: repo: graphId, src: Number(nodeId), dest: Number(targetId!) - }) + }), + cache: 'no-store' }) if (!result.ok) { diff --git a/app/api/repo/[graph]/commit/route.ts b/app/api/repo/[graph]/commit/route.ts index 53b68e7c..c1f8bf66 100644 --- a/app/api/repo/[graph]/commit/route.ts +++ b/app/api/repo/[graph]/commit/route.ts @@ -9,7 +9,8 @@ export async function GET(request: NextRequest, { params }: { params: { graph: s headers: { "Authorization": process.env.SECRET_TOKEN!, "Content-Type": 'application/json' - } + }, + cache: 'no-store' }) if (!result.ok) { diff --git a/app/api/repo/[graph]/info/route.ts b/app/api/repo/[graph]/info/route.ts index 4c174b77..d1aad4b4 100644 --- a/app/api/repo/[graph]/info/route.ts +++ b/app/api/repo/[graph]/info/route.ts @@ -9,7 +9,8 @@ export async function GET(request: NextRequest, { params }: { params: { graph: s headers: { "Authorization": process.env.SECRET_TOKEN!, "Content-Type": 'application/json' - } + }, + cache: 'no-store' }) if (!result.ok) { diff --git a/app/api/repo/[graph]/neighbors/route.ts b/app/api/repo/[graph]/neighbors/route.ts index 1ce5afe0..0355d424 100644 --- a/app/api/repo/[graph]/neighbors/route.ts +++ b/app/api/repo/[graph]/neighbors/route.ts @@ -12,7 +12,8 @@ export async function POST(request: NextRequest, { params }: { params: { graph: headers: { "Content-Type": 'application/json', "Authorization": process.env.SECRET_TOKEN!, - } + }, + cache: 'no-store' }) const json = await result.json() diff --git a/app/api/repo/[graph]/route.ts b/app/api/repo/[graph]/route.ts index c106caf3..572ebe0d 100644 --- a/app/api/repo/[graph]/route.ts +++ b/app/api/repo/[graph]/route.ts @@ -39,7 +39,8 @@ export async function POST(request: NextRequest, { params }: { params: { graph: headers: { "Authorization": process.env.SECRET_TOKEN!, "Content-Type": 'application/json' - } + }, + cache: 'no-store' }) if (!result.ok) { diff --git a/app/api/repo/route.ts b/app/api/repo/route.ts index 5e6c3872..d7d76fbd 100644 --- a/app/api/repo/route.ts +++ b/app/api/repo/route.ts @@ -6,7 +6,8 @@ export async function GET() { method: 'GET', headers: { "Authorization": process.env.SECRET_TOKEN!, - } + }, + cache: 'no-store' }) if (!result.ok) { @@ -32,7 +33,8 @@ export async function GET() { // headers: { // "Authorization": process.env.SECRET_TOKEN!, // 'Content-Type': 'application/json' -// } +// }, +// cache: 'no-store' // }) // if (!result.ok) {