feat: add source URL functionality to recipe modal, including dynamic display and editing options

This commit is contained in:
Will Miao
2025-05-05 20:50:32 +08:00
parent 71b97d5974
commit fd593bb61d
4 changed files with 259 additions and 2 deletions

View File

@@ -1169,9 +1169,9 @@ class RecipeRoutes:
data = await request.json()
# Validate required fields
if 'title' not in data and 'tags' not in data:
if 'title' not in data and 'tags' not in data and 'source_path' not in data:
return web.json_response({
"error": "At least one field to update must be provided (title or tags)"
"error": "At least one field to update must be provided (title or tags or source_path)"
}, status=400)
# Use the recipe scanner's update method