aboutsummaryrefslogtreecommitdiff
path: root/src/api_server.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-17 21:59:07 +0200
committerAlex Auvolat <alex@adnab.me>2020-04-17 21:59:07 +0200
commit3f40ef149f6dd4d61ceb326b5691e186aec178c3 (patch)
treef28af6fdb06cbe9b3f91f54aab9c4077bd83276d /src/api_server.rs
parentf62b54f1dffe9b76aab47d32ba7f47411d5a58af (diff)
downloadgarage-3f40ef149f6dd4d61ceb326b5691e186aec178c3.tar.gz
garage-3f40ef149f6dd4d61ceb326b5691e186aec178c3.zip
Fix sync: use max root checksum level
Diffstat (limited to 'src/api_server.rs')
-rw-r--r--src/api_server.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/api_server.rs b/src/api_server.rs
index 4ae48720..c6d52d16 100644
--- a/src/api_server.rs
+++ b/src/api_server.rs
@@ -86,16 +86,14 @@ async fn handler_inner(
.to_string();
let version_uuid =
handle_put(garage, &mime_type, &bucket, &key, req.into_body()).await?;
- Ok(Response::new(Box::new(BytesBody::from(format!(
- "{:?}\n",
- version_uuid
+ Ok(Response::new(Box::new(BytesBody::from(hex::encode(
+ version_uuid,
)))))
}
&Method::DELETE => {
let version_uuid = handle_delete(garage, &bucket, &key).await?;
- Ok(Response::new(Box::new(BytesBody::from(format!(
- "{:?}\n",
- version_uuid
+ Ok(Response::new(Box::new(BytesBody::from(hex::encode(
+ version_uuid,
)))))
}
_ => Err(Error::BadRequest(format!("Invalid method"))),