This commit is contained in:
2022-10-05 22:28:27 +05:30
parent 1ed2df0977
commit 8de78584b8
4 changed files with 75 additions and 13 deletions

View File

@@ -133,8 +133,8 @@ async fn hello(
let query = format!("https://openlibrary.org/search.json?q={}", search);
let res = reqwest::get(query).await.expect("Unable to request");
let mut resjson = res.json::<Books>().await.expect("Unable to return value");
resjson.set_all_cover_urls();
resjson.docs.truncate(10);
resjson.set_all_cover_urls();
print!("Search token {:?}\n", search);
return Json(resjson);
//return "Hello";