mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-01-23 09:12:56 -05:00
feat: Optionally include URL when importing via HTML/JSON (#6709)
This commit is contained in:
@@ -148,7 +148,7 @@ class RecipeController(BaseRecipeController):
|
||||
async def _create_recipe_from_web(self, req: ScrapeRecipe | ScrapeRecipeData):
|
||||
if isinstance(req, ScrapeRecipeData):
|
||||
html = req.data
|
||||
url = ""
|
||||
url = req.url or ""
|
||||
else:
|
||||
html = None
|
||||
url = req.url
|
||||
|
||||
@@ -27,3 +27,6 @@ class ScrapeRecipe(ScrapeRecipeBase):
|
||||
class ScrapeRecipeData(ScrapeRecipeBase):
|
||||
data: str
|
||||
"""HTML data or JSON string of a https://schema.org/Recipe object"""
|
||||
|
||||
url: str | None = None
|
||||
"""Optional URL of the recipe source"""
|
||||
|
||||
Reference in New Issue
Block a user