From a3566e49da406db9499a58a754af725a54d332af Mon Sep 17 00:00:00 2001 From: Quentin Date: Mon, 14 Dec 2020 21:50:40 +0100 Subject: Start to implement Website CLI --- src/garage/admin_rpc.rs | 5 ++--- src/garage/main.rs | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/garage/admin_rpc.rs b/src/garage/admin_rpc.rs index 8bf1dec2..1e363677 100644 --- a/src/garage/admin_rpc.rs +++ b/src/garage/admin_rpc.rs @@ -156,12 +156,11 @@ impl AdminRpcHandler { ))) } BucketOperation::Website(query) => { - /*let bucket = self.get_existing_bucket(&query.bucket).await?; - + let bucket = self.get_existing_bucket(&query.bucket).await?; if query.allow && query.deny { return Err(Error::Message(format!("Website can not be both allowed and denied on a bucket"))); } - + /* if query.allow || query.deny { let exposed = query.allow; if let BucketState::Present(state) = bucket.state.get_mut() { diff --git a/src/garage/main.rs b/src/garage/main.rs index d97ca3b8..7c8899a0 100644 --- a/src/garage/main.rs +++ b/src/garage/main.rs @@ -156,6 +156,9 @@ pub struct WebsiteOpt { /// Delete #[structopt(long = "deny")] pub deny: bool, + + /// Bucket name + pub bucket: String, } #[derive(Serialize, Deserialize, StructOpt, Debug)] -- cgit v1.2.3