Add task update endpoint

This commit is contained in:
2022-02-20 20:53:34 +01:00
parent f090741944
commit b2bc58f2f6
9 changed files with 570 additions and 221 deletions

View File

@@ -31,6 +31,7 @@ pub fn run(listener: TcpListener) -> Result<Server, std::io::Error> {
.route("/ping", web::get().to(routes::ping))
.route("/tasks", web::get().to(routes::list_tasks))
.route("/tasks", web::post().to(routes::add_task))
.route("/tasks/{task_id}", web::put().to(routes::update_task))
.route(
"/tasks",
web::method(http::Method::OPTIONS).to(routes::option_task),