Recipe edit (WIP)
This commit is contained in:
parent
fce4eade73
commit
c6dfff065c
24 changed files with 1157 additions and 971 deletions
|
|
@ -92,31 +92,32 @@ async fn main() {
|
|||
.route("/", get(services::home_page))
|
||||
.route(
|
||||
"/signup",
|
||||
get(services::sign_up_get).post(services::sign_up_post),
|
||||
get(services::user::sign_up_get).post(services::user::sign_up_post),
|
||||
)
|
||||
.route("/validation", get(services::sign_up_validation))
|
||||
.route("/revalidation", get(services::email_revalidation))
|
||||
.route("/validation", get(services::user::sign_up_validation))
|
||||
.route("/revalidation", get(services::user::email_revalidation))
|
||||
.route(
|
||||
"/signin",
|
||||
get(services::sign_in_get).post(services::sign_in_post),
|
||||
get(services::user::sign_in_get).post(services::user::sign_in_post),
|
||||
)
|
||||
.route("/signout", get(services::sign_out))
|
||||
.route("/signout", get(services::user::sign_out))
|
||||
.route(
|
||||
"/ask_reset_password",
|
||||
get(services::ask_reset_password_get).post(services::ask_reset_password_post),
|
||||
get(services::user::ask_reset_password_get)
|
||||
.post(services::user::ask_reset_password_post),
|
||||
)
|
||||
.route(
|
||||
"/reset_password",
|
||||
get(services::reset_password_get).post(services::reset_password_post),
|
||||
get(services::user::reset_password_get).post(services::user::reset_password_post),
|
||||
)
|
||||
// Recipes.
|
||||
.route("/recipe/new", get(services::create_recipe))
|
||||
// .route("/recipe/edit/:id", get(services::edit_recipe))
|
||||
.route("/recipe/view/:id", get(services::view_recipe))
|
||||
.route("/recipe/new", get(services::recipe::create))
|
||||
.route("/recipe/edit/:id", get(services::recipe::edit_recipe))
|
||||
.route("/recipe/view/:id", get(services::recipe::view))
|
||||
// User.
|
||||
.route(
|
||||
"/user/edit",
|
||||
get(services::edit_user_get).post(services::edit_user_post),
|
||||
get(services::user::edit_user_get).post(services::user::edit_user_post),
|
||||
)
|
||||
.route_layer(middleware::from_fn(services::ron_error_to_html));
|
||||
|
||||
|
|
@ -233,6 +234,11 @@ async fn process_args() -> bool {
|
|||
)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
event!(
|
||||
Level::INFO,
|
||||
"A new test database has been created successfully"
|
||||
);
|
||||
}
|
||||
Err(error) => {
|
||||
event!(Level::ERROR, "{}", error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue