aboutsummaryrefslogtreecommitdiff
path: root/src/api_server.rs
diff options
context:
space:
mode:
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"))),