aboutsummaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-01-03 18:32:15 +0100
committerAlex Auvolat <alex@adnab.me>2022-01-04 12:52:47 +0100
commit1bcd6fabbdc0cd9dee88ba28daecb5339f2c13ec (patch)
tree6a812200ac8e049c21702ae1623a516d6e274f28 /src/web
parentba7f268b990cd17c5d20bf9e0eb6ff77d30fe845 (diff)
downloadgarage-1bcd6fabbdc0cd9dee88ba28daecb5339f2c13ec.tar.gz
garage-1bcd6fabbdc0cd9dee88ba28daecb5339f2c13ec.zip
New buckets for 0.6.0: small changes
- Fix bucket delete - fix merge of bucket creation date - Replace deletable with option in aliases Rationale: if two aliases point to conflicting bucket, resolving by making an arbitrary choice risks making data accessible when it shouldn't be. We'd rather resolve to deleting the alias until someone puts it back.
Diffstat (limited to 'src/web')
-rw-r--r--src/web/web_server.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/web/web_server.rs b/src/web/web_server.rs
index cc6eed57..f13f289e 100644
--- a/src/web/web_server.rs
+++ b/src/web/web_server.rs
@@ -86,9 +86,8 @@ async fn serve_file(garage: Arc<Garage>, req: Request<Body>) -> Result<Response<
.bucket_alias_table
.get(&EmptyKey, &bucket_name.to_string())
.await?
- .map(|x| x.state.take().into_option())
+ .map(|x| x.state.take())
.flatten()
- .map(|param| param.bucket_id)
.ok_or(Error::NotFound)?;
// Check bucket isn't deleted and has website access enabled