diff --git a/Cargo.toml b/Cargo.toml index 1148c7c..9aa19f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ rand = "*" # hell gpx = { version = "0"} -utoipa = { version = "3", features = ["actix_extras"] } +utoipa = { version = "3", features = ["actix_extras", "uuid", "chrono"] } utoipa-swagger-ui = { version = "3", features = ["actix-web"] } futures = "0.3" diff --git a/flake.nix b/flake.nix index 081279d..bd2d784 100644 --- a/flake.nix +++ b/flake.nix @@ -48,7 +48,7 @@ packages = { trekkie = package; test-vm = test-vm-pkg; - test-vm-wrapper = pkgs.writeScript "trekkie-test-vm-wrapper" + test-vm-wrapper = pkgs.writeScriptBin "trekkie-test-vm-wrapper" '' set -e diff --git a/src/routes/mod.rs b/src/routes/mod.rs index f3e3486..345f4b9 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -70,7 +70,8 @@ impl error::ResponseError for ServerError { user::UserLogin, run::SubmitTravelV1, run::SubmitTravelV2, - run::SubmitGpsPoint + run::SubmitGpsPoint, + run::SubmitRun )) )] pub struct ApiDoc; diff --git a/src/routes/run.rs b/src/routes/run.rs index 0ef95bc..4c4d504 100644 --- a/src/routes/run.rs +++ b/src/routes/run.rs @@ -63,7 +63,7 @@ pub struct SubmitRun { post, path = "/v2/trekkie", responses( - (status = 200, description = "travel was successfully submitted", body = crate::routes::SubmitRun), + (status = 200, description = "travel was successfully submitted", body = SubmitRun), (status = 500, description = "postgres pool error") ), )] @@ -117,7 +117,7 @@ pub async fn travel_submit_run_v1( post, path = "/v2/trekkie", responses( - (status = 200, description = "travel was successfully submitted", body = crate::routes::SubmitRun), + (status = 200, description = "travel was successfully submitted", body = SubmitRun), (status = 500, description = "postgres pool error") ), )] @@ -271,7 +271,7 @@ pub async fn terminate_run( post, path = "/v2/trekkie/{id}/live", responses( - (status = 200, description = "travel was successfully submitted", body = crate::routes::SubmitRun), + (status = 200, description = "travel was successfully submitted", body = SubmitRun), (status = 500, description = "postgres pool error") ), )] diff --git a/src/routes/user.rs b/src/routes/user.rs index 58db34b..536cbbf 100644 --- a/src/routes/user.rs +++ b/src/routes/user.rs @@ -56,7 +56,7 @@ pub fn fetch_user( post, path = "/v2/user", responses( - (status = 200, description = "trekkie user was successfully created", body = crate::routes::UserCreation), + (status = 200, description = "trekkie user was successfully created", body = UserCreation), (status = 500, description = "postgres pool error") ), )] @@ -120,7 +120,7 @@ pub async fn user_create( path = "/v2/auth/login", request_body = UserLogin, responses( - (status = 200, description = "trekkie user was successfully logged in", body = crate::routes::Response), + (status = 200, description = "trekkie user was successfully logged in", body = Response), (status = 500, description = "postgres pool error") ), )]