diff options
author | Cara Salter <cara@devcara.com> | 2022-06-09 15:20:17 -0400 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2022-06-09 15:20:17 -0400 |
commit | f64edeb631bfdefcd757483d7dfbe204daabf1ab (patch) | |
tree | 8bb4e505c2de62cdaecbb134733e2dbb3ea218cc /src/main.rs | |
parent | 03989d646ee3fd74536d420860e9f5bcf58937af (diff) | |
download | solard-f64edeb631bfdefcd757483d7dfbe204daabf1ab.tar.gz solard-f64edeb631bfdefcd757483d7dfbe204daabf1ab.zip |
state: Force reboot/shutdown
Closes #1
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index b962764..c235d41 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,9 +37,11 @@ async fn main() { .route("/planets/list", get(handlers::planets::list)) .route("/planets/:uuid", get(handlers::planets::get)) .route("/planets/:uuid/shutdown", post(handlers::planets::shutdown)) + .route("/planets/:uuid/shutdown/hard", post(handlers::planets::force_shutdown)) .route("/planets/:uuid/start", post(handlers::planets::start)) .route("/planets/:uuid/pause", post(handlers::planets::pause)) .route("/planets/:uuid/reboot", post(handlers::planets::reboot)) + .route("/planets/:uuid/reboot/hard", post(handlers::planets::force_reboot)) .layer( ServiceBuilder::new() .layer(HandleErrorLayer::new(|error: BoxError| async move { if error.is::<tower::timeout::error::Elapsed>() { |