From 67f66e29780dc7ffff940f31685b7ae2ebd4ba3c Mon Sep 17 00:00:00 2001 From: Bartosz Art Date: Mon, 10 Jun 2024 20:36:15 +0200 Subject: [PATCH] Added noStore to scraping --- src/repository/postgres/itemRepository.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/repository/postgres/itemRepository.ts b/src/repository/postgres/itemRepository.ts index 6d313ba..998aae6 100644 --- a/src/repository/postgres/itemRepository.ts +++ b/src/repository/postgres/itemRepository.ts @@ -1,8 +1,11 @@ +import { unstable_noStore as noStore } from 'next/cache'; + import Item, { ItemMin } from '@/models/Item'; import Vendor from '@/models/Vendor'; import { db } from '@vercel/postgres'; export const getItems = async (): Promise => { + noStore(); const result = await db`SELECT Item.Id, link, Item.Name, active, image_link, Vendor.Id as vendor_id, Vendor.Name as vendor_name FROM Item JOIN Vendor ON Item.vendorId = Vendor.Id;`;