aboutsummaryrefslogtreecommitdiff
path: root/src/api/admin/api_server.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/admin/api_server.rs')
-rw-r--r--src/api/admin/api_server.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/api/admin/api_server.rs b/src/api/admin/api_server.rs
index b2effa62..098a54aa 100644
--- a/src/api/admin/api_server.rs
+++ b/src/api/admin/api_server.rs
@@ -114,13 +114,9 @@ impl ApiHandler for AdminApiServer {
if let Some(h) = expected_auth_header {
match req.headers().get("Authorization") {
- None => Err(Error::Forbidden(
- "Authorization token must be provided".into(),
- )),
+ None => Err(Error::forbidden("Authorization token must be provided")),
Some(v) if v.to_str().map(|hv| hv == h).unwrap_or(false) => Ok(()),
- _ => Err(Error::Forbidden(
- "Invalid authorization token provided".into(),
- )),
+ _ => Err(Error::forbidden("Invalid authorization token provided")),
}?;
}