feat: Optionally include URL when importing via HTML/JSON (#6709)

This commit is contained in:
Michael Genson
2025-12-12 23:20:26 -06:00
committed by GitHub
parent 24c111af7b
commit 20a6e71b31
10 changed files with 43 additions and 15 deletions

View File

@@ -146,8 +146,8 @@ export class RecipeAPI extends BaseCRUDAPI<CreateRecipe, Recipe, Recipe> {
return await this.requests.post<Recipe | null>(routes.recipesTestScrapeUrl, { url, useOpenAI });
}
async createOneByHtmlOrJson(data: string, includeTags: boolean) {
return await this.requests.post<string>(routes.recipesCreateFromHtmlOrJson, { data, includeTags });
async createOneByHtmlOrJson(data: string, includeTags: boolean, url: string | null = null) {
return await this.requests.post<string>(routes.recipesCreateFromHtmlOrJson, { data, includeTags, url });
}
async createOneByUrl(url: string, includeTags: boolean) {