feat: Security CSRF Fix, Logout optimierung, Footer Anpassung, Rechtstexteanpassung
Docker Image bauen und veroeffentlichen / build-and-push (push) Failing after 1m33s

This commit is contained in:
Nick Szaunig committed 2026-09-03 13:51:50 +02:00
1 parent 0753a3bc8a
commit 4d3100e9ba
28 files changed
+802 -121

No files matched your search

+10 -1
View File
@@ -105,21 +105,30 @@ export async function getProductsByIds(
return products.map(normalizeProduct);
}
/** Nur oeffentlich sichtbare Ernten (siehe Harvest.isPublished) — fuer Shop-/Ernten-Seiten. */
export async function getHarvests(): Promise<(Harvest & { batches: Batch[] })[]> {
return prisma.harvest.findMany({
where: { isPublished: true },
include: { batches: true },
orderBy: [{ year: "desc" }, { harvestDate: "desc" }],
});
}
/**
* Nur oeffentlich sichtbare Ernten (siehe Harvest.isPublished) — gibt null
* zurueck, wenn die Ernte nicht existiert ODER noch nicht veroeffentlicht
* ist, damit unveroeffentlichte (z.B. frisch aus ApiCore synchronisierte)
* Ernten ueber ihre Shop-URL nicht erratbar sind.
*/
export async function getHarvestByYearType(
year: number,
type: string
): Promise<(Harvest & { batches: Batch[]; products: Product[] }) | null> {
return prisma.harvest.findUnique({
const harvest = await prisma.harvest.findUnique({
where: { year_type: { year, type } },
include: { batches: true, products: true },
});
return harvest && harvest.isPublished ? harvest : null;
}
export async function getBatchByCode(