Skip to content

Commit df36823

Browse files
cache bt
1 parent 8ab2a6e commit df36823

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/app/api/selected-papers/route.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,20 @@ export async function GET() {
1414
{
1515
message: "No selected papers found.",
1616
},
17-
{ status: 404 },
17+
{ status: 404, headers: { "Cache-Control": "no-store" } },
1818
);
1919
}
20-
return NextResponse.json(selectedPapers, { status: 200 });
20+
return NextResponse.json(selectedPapers, {
21+
status: 200,
22+
headers: { "Cache-Control": "no-store" },
23+
});
2124
} catch (error) {
2225
console.error("Error fetching papers:", error);
2326
return NextResponse.json(
2427
{
2528
error: "Failed to fetch papers.",
2629
},
27-
{ status: 500 },
30+
{ status: 500, headers: { "Cache-Control": "no-store" } },
2831
);
2932
}
3033
}

0 commit comments

Comments
 (0)