summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 75f491a..43957ff 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -29,7 +29,7 @@ use utoipa_swagger_ui::SwaggerUi;
29mod config; 29mod config;
30mod db; 30mod db;
31mod error; 31mod error;
32mod extractors; 32mod auth;
33mod routes; 33mod routes;
34mod services; 34mod services;
35mod wol; 35mod wol;
@@ -126,7 +126,7 @@ async fn main() -> color_eyre::eyre::Result<()> {
126 ) 126 )
127 .route("/device/:id", get(device::get)) 127 .route("/device/:id", get(device::get))
128 .route("/status", get(status::status)) 128 .route("/status", get(status::status))
129 .route_layer(from_fn_with_state(shared_state.clone(), extractors::auth)) 129 .route_layer(from_fn_with_state(shared_state.clone(), auth::auth))
130 .merge(SwaggerUi::new("/swagger-ui").url("/api-docs/openapi.json", ApiDoc::openapi())) 130 .merge(SwaggerUi::new("/swagger-ui").url("/api-docs/openapi.json", ApiDoc::openapi()))
131 .with_state(Arc::new(shared_state)); 131 .with_state(Arc::new(shared_state));
132 132