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.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/api/admin/api_server.rs b/src/api/admin/api_server.rs
index dae42059..58dd38d8 100644
--- a/src/api/admin/api_server.rs
+++ b/src/api/admin/api_server.rs
@@ -119,12 +119,16 @@ impl AdminApiServer {
let bucket_website_config = bucket_state.website_config.get();
match bucket_website_config {
- Some(_v) => Ok(Response::builder()
- .status(StatusCode::OK)
- .body(Body::from("Bucket authorized for website hosting"))?),
- None => Err(Error::bad_request(
- "Bucket is not authorized for website hosting",
- )),
+ Some(_v) => {
+ Ok(Response::builder()
+ .status(StatusCode::OK)
+ .body(Body::from(format!(
+ "Bucket '{domain}' is authorized for website hosting"
+ )))?)
+ }
+ None => Err(Error::bad_request(format!(
+ "Bucket '{domain}' is not authorized for website hosting"
+ ))),
}
}