Recipe edit (WIP): all form fields are now saved
This commit is contained in:
parent
07b7ff425e
commit
6876a254e1
12 changed files with 563 additions and 210 deletions
|
|
@ -61,14 +61,14 @@ const TRACING_LEVEL: tracing::Level = tracing::Level::INFO;
|
|||
// TODO: Should main returns 'Result'?
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
if process_args().await {
|
||||
return;
|
||||
}
|
||||
|
||||
tracing_subscriber::fmt()
|
||||
.with_max_level(TRACING_LEVEL)
|
||||
.init();
|
||||
|
||||
if process_args().await {
|
||||
return;
|
||||
}
|
||||
|
||||
event!(Level::INFO, "Starting Recipes as web server...");
|
||||
|
||||
let config = config::load();
|
||||
|
|
@ -109,6 +109,26 @@ async fn main() {
|
|||
"/recipe/set_group_comment",
|
||||
put(services::ron::set_group_comment),
|
||||
)
|
||||
.route(
|
||||
"/recipe/set_step_action",
|
||||
put(services::ron::set_step_action),
|
||||
)
|
||||
.route(
|
||||
"/recipe/set_ingredient_name",
|
||||
put(services::ron::set_ingredient_name),
|
||||
)
|
||||
.route(
|
||||
"/recipe/set_ingredient_comment",
|
||||
put(services::ron::set_ingredient_comment),
|
||||
)
|
||||
.route(
|
||||
"/recipe/set_ingredient_quantity",
|
||||
put(services::ron::set_ingredient_quantity),
|
||||
)
|
||||
.route(
|
||||
"/recipe/set_ingredient_unit",
|
||||
put(services::ron::set_ingredient_unit),
|
||||
)
|
||||
.fallback(services::ron::not_found);
|
||||
|
||||
let fragments_routes = Router::new().route(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue