diff options
author | FxQnLr <[email protected]> | 2024-04-08 15:14:21 +0200 |
---|---|---|
committer | FxQnLr <[email protected]> | 2024-04-08 15:14:21 +0200 |
commit | 52851787329c48c1e70f98a3610ad52fe1fa4aa4 (patch) | |
tree | af1a1adeff7cf3fd8f3f1aba093aacf2a337e78d /src/main.rs | |
parent | d8060da1180545df5d03a76cd2860191ecf87507 (diff) | |
download | webol-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.rs | 4 |
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; | |||
29 | mod config; | 29 | mod config; |
30 | mod db; | 30 | mod db; |
31 | mod error; | 31 | mod error; |
32 | mod extractors; | 32 | mod auth; |
33 | mod routes; | 33 | mod routes; |
34 | mod services; | 34 | mod services; |
35 | mod wol; | 35 | mod 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 | ||