diff --git a/.github/workflows/pr_test.yml b/.github/workflows/pr_test.yml index 299a569..7c27463 100644 --- a/.github/workflows/pr_test.yml +++ b/.github/workflows/pr_test.yml @@ -20,11 +20,8 @@ jobs: profile: minimal override: true - - name: Run cargo update --locked - run: cargo update --locked + - name: Run cargo build + run: cargo build - name: Run cargo test run: cargo test - - - name: Run cargo build - run: cargo build diff --git a/src/main.rs b/src/main.rs index 214f18a..7fdbaec 100644 --- a/src/main.rs +++ b/src/main.rs @@ -49,10 +49,12 @@ async fn main() -> ExitCode { errors::catchers::handle_400, ], ) + .mount("/", openapi_get_routes![routes::health,]) + .mount("/health", openapi_get_routes![routes::health,]) .mount( "/v1", openapi_get_routes![ - routes::healthy, + routes::health, routes::policies::get_policies, routes::policies::get_policy, routes::policies::create_policy, diff --git a/src/routes/mod.rs b/src/routes/mod.rs index 937f6f9..b7ebcb2 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -1,5 +1,4 @@ use rocket::get; -use rocket::response::status; use rocket_okapi::openapi; pub mod authorization; @@ -9,6 +8,6 @@ pub mod schema; #[openapi] #[get("/")] -pub async fn healthy() -> status::NoContent { - status::NoContent +pub async fn health() -> &'static str { + "ok" }