Skip to content

Commit

Permalink
Added noStore to scraping
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtoszBart committed Jun 10, 2024
1 parent 8dd0262 commit 67f66e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/repository/postgres/itemRepository.ts
Original file line number Diff line number Diff line change
@@ -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<Item[]> => {
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;`;

Expand Down

0 comments on commit 67f66e2

Please sign in to comment.