aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorFxQnLr <[email protected]>2024-04-08 15:14:21 +0200
committerFxQnLr <[email protected]>2024-04-08 15:14:21 +0200
commit52851787329c48c1e70f98a3610ad52fe1fa4aa4 (patch)
treeaf1a1adeff7cf3fd8f3f1aba093aacf2a337e78d /src/main.rs
parentd8060da1180545df5d03a76cd2860191ecf87507 (diff)
downloadwebol-52851787329c48c1e70f98a3610ad52fe1fa4aa4.tar
webol-52851787329c48c1e70f98a3610ad52fe1fa4aa4.tar.gz
webol-52851787329c48c1e70f98a3610ad52fe1fa4aa4.zip
Closes #25. Apikey not required anymore
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