mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-14 22:35:17 -05:00
feat: Optionally include URL when importing via HTML/JSON (#6709)
This commit is contained in:
@@ -510,6 +510,7 @@ export interface ScrapeRecipeBase {
|
||||
export interface ScrapeRecipeData {
|
||||
includeTags?: boolean;
|
||||
data: string;
|
||||
url?: string | null;
|
||||
}
|
||||
export interface ScrapeRecipeTest {
|
||||
url: string;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user