server: Add a route to add a recipe
This commit is contained in:
parent
82b466f52c
commit
e49a5829c4
3 changed files with 83 additions and 0 deletions
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue