From db008c582f52adf0b492f9c2ee47b58ceac87726 Mon Sep 17 00:00:00 2001 From: Nulo Date: Tue, 2 Jan 2024 19:25:31 -0300 Subject: [PATCH] solo mostrar articulos con stock en home --- sitio/src/routes/+page.server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sitio/src/routes/+page.server.ts b/sitio/src/routes/+page.server.ts index f43feb5..2f44867 100644 --- a/sitio/src/routes/+page.server.ts +++ b/sitio/src/routes/+page.server.ts @@ -12,7 +12,7 @@ export const load: PageServerLoad = async ({ params }) => { }) .from(precios) .groupBy(precios.ean) - .having(sql`max(length(name)) and max(parser_version)`) + .having(sql`max(length(name)) and max(parser_version) and in_stock`) .orderBy(sql`random()`) .limit(150); const res = await q;