Commit f91fce1d authored by Stavros Korokithakis's avatar Stavros Korokithakis

Fix the path lookup API endpoint

parent a6574725
......@@ -30,7 +30,9 @@ pub fn start_api() {
});
Response::json(&ExitResponse{result: "ok".to_owned()})
},
(GET) (/api/path/{path: String}) => {
(GET) (/api/path/) => {
let path = request.get_param("path").unwrap_or("".to_string());
let hashes = IPFS_HASHES.lock().unwrap();
if hashes.contains_key(&path) {
let hash = hashes.get(&path).unwrap();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment