feat: support external and step images with structured cooking instructions

This commit is contained in:
Sascha Nesterovic committed 2026-10-24 17:31:47 +02:00
1 parent 361862ad0b
commit 0ec1d45bdb
34 files changed
+898 -92

No files matched your search

+4 -1
View File
@@ -249,7 +249,10 @@ async function handle(req: Request, ctx: Context) {
.parse(await jsonBody(req));
if (
(await listRecipes(true)).some(
(r) => r.image === `/media/${name}` || r.images.includes(`/media/${name}`),
(r) =>
r.image === `/media/${name}` ||
r.images.includes(`/media/${name}`) ||
r.steps.some((s) => s.images.includes(`/media/${name}`)),
)
)
throw new ApiError(409, 'Das Bild wird noch von einem Rezept verwendet.');