v0.14-popupV2
This commit is contained in:
@@ -795,10 +795,11 @@ println!("Updating book");
|
||||
|
||||
dotenvy::dotenv().ok();
|
||||
let images_dir = env::var("IMAGES_DIR").expect("IMAGES_DIR is not set in .env file");
|
||||
let backend_url = env::var("BACKEND_URL").expect("BACKEND_URL is not set in .env file");
|
||||
|
||||
let mut cover = doc_sent.cover.clone();
|
||||
if !doc_sent.cover.is_none() {
|
||||
if doc_sent.cover.clone().unwrap().contains("vinodjam") {
|
||||
if doc_sent.cover.clone().unwrap().contains(&backend_url) {
|
||||
cover = Some(doc_sent.cover.clone().unwrap().split("/").last().unwrap().to_string());
|
||||
} else {
|
||||
let img_bytes = reqwest::get(cover.unwrap()).await.unwrap().bytes().await.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user