server: Add a route to add a recipe

This commit is contained in:
traxys 2023-06-22 22:29:53 +02:00
parent 82b466f52c
commit e49a5829c4
3 changed files with 83 additions and 0 deletions

View file

@ -83,3 +83,16 @@ pub struct EditIngredientRequest {
#[serde(default)]
pub has_unit: bool,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct CreateRecipeRequest {
pub name: String,
pub rating: u8,
pub ingredients: Vec<(i64, f64)>,
pub steps: Vec<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct CreateRecipeResponse {
pub id: i64,
}