app,server: Allow to set the person count when creating a recipe

This commit is contained in:
traxys 2023-06-29 17:35:35 +02:00
parent 614ff07552
commit 8987991139
4 changed files with 31 additions and 1 deletions

View file

@ -86,6 +86,7 @@ pub struct EditIngredientRequest {
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct CreateRecipeRequest {
pub person_count: u32,
pub name: String,
pub rating: u8,
pub ingredients: Vec<(i64, f64)>,
@ -106,6 +107,7 @@ pub struct ListRecipesResponse {
pub struct RecipeInfo {
pub name: String,
pub rating: u8,
pub person_count: u32,
pub steps: String,
pub ingredients: Vec<(i64, IngredientInfo, f64)>,
}
@ -134,3 +136,8 @@ pub struct RecipeEditStepsRequest {
pub struct RecipeEditRating {
pub rating: u8,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct RecipeEditPersonCount {
pub person_count: u32,
}