Compare commits

..

No commits in common. "71e66cf437564701395d14f8c5fd645b0bc10682" and "5c52a12fdfb17d6e5e34a8d052704e1746f7a064" have entirely different histories.

2 changed files with 4 additions and 4 deletions

View file

@ -32,7 +32,7 @@ const zProductLd = z.object({
name: z.string(),
image: z.string(),
offers: z.object({
offers: z.array(
offers: z.tuple([
z.object({
"@type": z.literal("Offer"),
price: z.number(),
@ -41,8 +41,8 @@ const zProductLd = z.object({
"http://schema.org/OutOfStock",
"http://schema.org/InStock",
]),
})
),
}),
]),
}),
});
type ProductLd = z.infer<typeof zProductLd>;

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) and in_stock`)
.having(sql`max(length(name))`)
.orderBy(sql`random()`)
.limit(150);
const res = await q;