solo mostrar articulos con stock en home

This commit is contained in:
Cat /dev/Nulo 2024-01-02 19:25:31 -03:00
parent 21439a5da5
commit db008c582f

View file

@ -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;