minor bug fix

This commit is contained in:
Colin McKechney
2023-05-02 22:12:31 +00:00
parent c52bc3ce7e
commit 12f16b4145
2 changed files with 3 additions and 3 deletions

View File

@@ -285,8 +285,8 @@ fn week_meal_delete(items: &MenuItems) -> Result<()> {
let mut stmt = conn.statement(format!("delete from {} where item_id = :1", items.net_id).as_str()).build()?;
for meal in items.item_list {
stmt.execute(&[&items.net_id])?;
for meal in &items.item_list {
stmt.execute(&[meal])?;
}
Ok(())

View File

@@ -93,7 +93,7 @@ async fn main() -> std::io::Result<()> {
.route(web::get().to(api::result::all_result))
)
.service(
web::resource("add_result/")
web::resource("/add_result")
.route(web::post().to(api::result::add_result))
)
.route("/", web::get().to(api_index))