posprocessing hook for DRF

This commit is contained in:
vabene1111
2024-03-30 11:01:37 +01:00
parent cb98b6723f
commit dfd9f7b066
156 changed files with 11621 additions and 1118 deletions

View File

@@ -24,32 +24,13 @@ export interface RecipeShoppingUpdate {
* @type {number}
* @memberof RecipeShoppingUpdate
*/
readonly id: number;
/**
* Existing shopping list to update
* @type {number}
* @memberof RecipeShoppingUpdate
*/
listRecipe?: number;
/**
* List of ingredient IDs from the recipe to add, if not provided all ingredients will be added.
* @type {number}
* @memberof RecipeShoppingUpdate
*/
ingredients?: number;
/**
* Providing a list_recipe ID and servings of 0 will delete that shopping list.
* @type {number}
* @memberof RecipeShoppingUpdate
*/
servings?: number;
id?: number;
}
/**
* Check if a given object implements the RecipeShoppingUpdate interface.
*/
export function instanceOfRecipeShoppingUpdate(value: object): boolean {
if (!('id' in value)) return false;
return true;
}
@@ -63,10 +44,7 @@ export function RecipeShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator
}
return {
'id': json['id'],
'listRecipe': json['list_recipe'] == null ? undefined : json['list_recipe'],
'ingredients': json['ingredients'] == null ? undefined : json['ingredients'],
'servings': json['servings'] == null ? undefined : json['servings'],
'id': json['id'] == null ? undefined : json['id'],
};
}
@@ -76,9 +54,7 @@ export function RecipeShoppingUpdateToJSON(value?: RecipeShoppingUpdate | null):
}
return {
'list_recipe': value['listRecipe'],
'ingredients': value['ingredients'],
'servings': value['servings'],
'id': value['id'],
};
}