Current recipe id was not set
This commit is contained in:
parent
812ba9dc3b
commit
9dccd553bc
5 changed files with 28 additions and 12 deletions
|
|
@ -8,9 +8,9 @@ use crate::{
|
|||
};
|
||||
|
||||
pub struct Recipes {
|
||||
pub public: Vec<(i64, String)>,
|
||||
pub private: Vec<(i64, String)>,
|
||||
pub current_id: Option<i64>,
|
||||
public: Vec<(i64, String)>,
|
||||
private: Vec<(i64, String)>,
|
||||
current_id: Option<i64>,
|
||||
}
|
||||
|
||||
impl Recipes {
|
||||
|
|
@ -18,6 +18,7 @@ impl Recipes {
|
|||
connection: db::Connection,
|
||||
user: &Option<model::User>,
|
||||
lang: &str,
|
||||
current_id: Option<i64>,
|
||||
) -> Result<Self, db::DBError> {
|
||||
Ok(Recipes {
|
||||
public: connection
|
||||
|
|
@ -28,7 +29,7 @@ impl Recipes {
|
|||
} else {
|
||||
vec![]
|
||||
},
|
||||
current_id: None,
|
||||
current_id,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue