feat: support external and step images with structured cooking instructions
This commit is contained in:
1 parent
361862ad0b
commit
0ec1d45bdb
34 files changed
+898
-92
No files matched your search
@@ -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.');
|
||||
|
||||
Reference in new issue
Block a user