mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-11-25 09:31:00 +00:00
WIP fetch object
This commit is contained in:
parent
3cb3994cd2
commit
d445c4ef9c
1 changed files with 7 additions and 0 deletions
|
@ -57,6 +57,13 @@ async fn handler(
|
||||||
let path = req.uri().path().to_string();
|
let path = req.uri().path().to_string();
|
||||||
let key = percent_encoding::percent_decode_str(&path).decode_utf8()?;
|
let key = percent_encoding::percent_decode_str(&path).decode_utf8()?;
|
||||||
|
|
||||||
|
// Get bucket descriptor
|
||||||
|
let object = garage
|
||||||
|
.object_table
|
||||||
|
.get(&bucket.to_string(), &key.to_string())
|
||||||
|
.await?
|
||||||
|
.ok_or(Error::NotFound)?;
|
||||||
|
|
||||||
info!("Selected bucket: \"{}\", selected key: \"{}\"", bucket, key);
|
info!("Selected bucket: \"{}\", selected key: \"{}\"", bucket, key);
|
||||||
|
|
||||||
Ok(Response::new(Body::from("hello world\n")))
|
Ok(Response::new(Body::from("hello world\n")))
|
||||||
|
|
Loading…
Reference in a new issue