aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3_website.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-01-24 12:03:57 +0100
committerAlex Auvolat <alex@adnab.me>2022-01-24 12:32:28 +0100
commit513a6b15f99983c2054b95c6a17cebf672dbd360 (patch)
tree6b6e8efdc96a2aeaeb2f9f91109c58e883a0ec39 /src/api/s3_website.rs
parentea7fb901ebc316bba53d248a2f8bd7a3455f5791 (diff)
downloadgarage-513a6b15f99983c2054b95c6a17cebf672dbd360.tar.gz
garage-513a6b15f99983c2054b95c6a17cebf672dbd360.zip
Handle OPTIONS on website endpointbucket-cors
Diffstat (limited to 'src/api/s3_website.rs')
-rw-r--r--src/api/s3_website.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/api/s3_website.rs b/src/api/s3_website.rs
index d5864fc8..9d1da905 100644
--- a/src/api/s3_website.rs
+++ b/src/api/s3_website.rs
@@ -13,16 +13,7 @@ use garage_model::garage::Garage;
use garage_table::*;
use garage_util::data::*;
-pub async fn handle_get_website(
- garage: Arc<Garage>,
- bucket_id: Uuid,
-) -> Result<Response<Body>, Error> {
- let bucket = garage
- .bucket_table
- .get(&EmptyKey, &bucket_id)
- .await?
- .ok_or(Error::NoSuchBucket)?;
-
+pub async fn handle_get_website(bucket: &Bucket) -> Result<Response<Body>, Error> {
let param = bucket
.params()
.ok_or_internal_error("Bucket should not be deleted at this point")?;