- recipes: Vec<(i32, String)>,
- current_recipe_id: Option<i32>,
+ recipes: Vec<(i64, String)>,
+ current_recipe_id: Option<i64>,
- recipes: Vec<(i32, String)>,
- current_recipe_id: Option<i32>,
+ recipes: Vec<(i64, String)>,
+ current_recipe_id: Option<i64>,
current_recipe: model::Recipe,
}
#[get("/recipe/view/{id}")]
current_recipe: model::Recipe,
}
#[get("/recipe/view/{id}")]
-pub async fn view_recipe(req: HttpRequest, path: web::Path<(i32,)>, connection: web::Data<db::Connection>) -> Result<HttpResponse> {
+pub async fn view_recipe(req: HttpRequest, path: web::Path<(i64,)>, connection: web::Data<db::Connection>) -> Result<HttpResponse> {
let (id,)= path.into_inner();
let user = get_current_user(&req, connection.clone()).await;
let recipes = connection.get_all_recipe_titles_async().await?;
let (id,)= path.into_inner();
let user = get_current_user(&req, connection.clone()).await;
let recipes = connection.get_all_recipe_titles_async().await?;
Ok(db::SignUpResult::UserCreatedWaitingForValidation(token)) => {
let url = {
let host = req.headers().get(header::HOST).map(|v| v.to_str().unwrap_or_default()).unwrap_or_default();
Ok(db::SignUpResult::UserCreatedWaitingForValidation(token)) => {
let url = {
let host = req.headers().get(header::HOST).map(|v| v.to_str().unwrap_or_default()).unwrap_or_default();