Add stub for recipe creator
This commit is contained in:
parent
129c3c59a4
commit
05120ab201
1 changed files with 13 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ use super::{
|
||||||
pub(super) fn routes() -> Router<AppState> {
|
pub(super) fn routes() -> Router<AppState> {
|
||||||
Router::new()
|
Router::new()
|
||||||
.route("/", get(list_recipes))
|
.route("/", get(list_recipes))
|
||||||
|
.route("/create", get(create_recipe))
|
||||||
.route("/:id", get(view_recipe))
|
.route("/:id", get(view_recipe))
|
||||||
.route("/public/:hs/:id", get(view_public_recipe))
|
.route("/public/:hs/:id", get(view_public_recipe))
|
||||||
.route("/public/:hs", get(list_public_recipe))
|
.route("/public/:hs", get(list_public_recipe))
|
||||||
|
|
@ -242,3 +243,15 @@ async fn view_public_recipe(
|
||||||
|
|
||||||
Ok(base_page(recipe_view(&recipe, false, &state.db).await?))
|
Ok(base_page(recipe_view(&recipe, false, &state.db).await?))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn create_recipe(
|
||||||
|
user: &AuthenticatedUser,
|
||||||
|
household: &CurrentHousehold,
|
||||||
|
) -> Result<Markup, RouteError> {
|
||||||
|
Ok(sidebar(
|
||||||
|
SidebarLocation::RecipeCreator,
|
||||||
|
&household,
|
||||||
|
&user,
|
||||||
|
html! {},
|
||||||
|
))
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue