From 016fa3a31f8847d3f52800941b7f8fe5ef872240 Mon Sep 17 00:00:00 2001 From: FxQnLr Date: Thu, 15 Feb 2024 19:29:48 +0100 Subject: Closes #15. No usable Error message right now --- src/routes/start.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/routes/start.rs') diff --git a/src/routes/start.rs b/src/routes/start.rs index 66b7cb4..ec4f98f 100644 --- a/src/routes/start.rs +++ b/src/routes/start.rs @@ -20,7 +20,7 @@ pub async fn start( ) -> Result, Error> { info!("POST request"); let secret = headers.get("authorization"); - let authorized = auth(&state.config, secret)?; + let authorized = matches!(auth(&state.config, secret)?, crate::auth::Response::Success); if authorized { let device = sqlx::query_as!( Device, -- cgit v1.2.3