diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index b550dd8..edee184 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use crate::{ | 1 | use crate::{ |
2 | config::Config, | 2 | config::Config, |
3 | routes::{device, start, status}, | 3 | routes::{device, devices, start, status}, |
4 | services::ping::{BroadcastCommand, StatusMap}, | 4 | services::ping::{BroadcastCommand, StatusMap}, |
5 | storage::Device, | 5 | storage::Device, |
6 | }; | 6 | }; |
@@ -36,6 +36,7 @@ mod wol; | |||
36 | device::get, | 36 | device::get, |
37 | device::post, | 37 | device::post, |
38 | device::put, | 38 | device::put, |
39 | devices::get, | ||
39 | ), | 40 | ), |
40 | components( | 41 | components( |
41 | schemas( | 42 | schemas( |
@@ -113,6 +114,7 @@ async fn main() -> color_eyre::eyre::Result<()> { | |||
113 | .route("/start/:id", post(start::post).get(start::get)) | 114 | .route("/start/:id", post(start::post).get(start::get)) |
114 | .route("/device", post(device::post).put(device::put)) | 115 | .route("/device", post(device::post).put(device::put)) |
115 | .route("/device/:id", get(device::get)) | 116 | .route("/device/:id", get(device::get)) |
117 | .route("/devices", get(devices::get)) | ||
116 | .route("/status", get(status::status)) | 118 | .route("/status", get(status::status)) |
117 | .route_layer(from_fn_with_state(shared_state.clone(), auth::auth)) | 119 | .route_layer(from_fn_with_state(shared_state.clone(), auth::auth)) |
118 | .merge(SwaggerUi::new("/swagger-ui").url("/api-docs/openapi.json", ApiDoc::openapi())) | 120 | .merge(SwaggerUi::new("/swagger-ui").url("/api-docs/openapi.json", ApiDoc::openapi())) |