aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2020-11-21 16:01:26 +0100
committerAlex <alex@adnab.me>2020-11-21 16:01:26 +0100
commitb3814b15ccc233d7c4233b43816cce20db278f17 (patch)
treef37a1ce39bfae7c3f706162e186df4064635bd74 /src/api
parent5dc304ac41c2ae0699fbdd56117b60c517a1ad39 (diff)
parenta8b3c8fd5898400d64310f61bb1a41dd5fefe5ea (diff)
downloadgarage-b3814b15ccc233d7c4233b43816cce20db278f17.tar.gz
garage-b3814b15ccc233d7c4233b43816cce20db278f17.zip
Merge pull request 'Use cleaner CRDT data types for objects to avoid accidents like #16' (#18) from feature/better-crdt into master
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/18
Diffstat (limited to 'src/api')
-rw-r--r--src/api/s3_put.rs2
-rw-r--r--src/api/signature.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/api/s3_put.rs b/src/api/s3_put.rs
index 72613323..a1681d77 100644
--- a/src/api/s3_put.rs
+++ b/src/api/s3_put.rs
@@ -322,7 +322,7 @@ pub async fn handle_put_part(
let (object, first_block) = futures::try_join!(get_object_fut, get_first_block_fut)?;
// Check object is valid and multipart block can be accepted
- let first_block = first_block.ok_or(Error::BadRequest(format!("Empty body")))?;
+ let first_block = first_block.ok_or(Error::BadRequest(format!("Empty body")))?;
let object = object.ok_or(Error::BadRequest(format!("Object not found")))?;
if !object
diff --git a/src/api/signature.rs b/src/api/signature.rs
index 402b1881..0ee47961 100644
--- a/src/api/signature.rs
+++ b/src/api/signature.rs
@@ -68,7 +68,7 @@ pub async fn check_signature(
.key_table
.get(&EmptyKey, &authorization.key_id)
.await?
- .filter(|k| !k.deleted)
+ .filter(|k| !k.deleted.get())
.ok_or(Error::Forbidden(format!(
"No such key: {}",
authorization.key_id