1 files changed, 1 insertions(+), 1 deletions(-)
M src/main.rs
M src/main.rs => src/main.rs +1 -1
@@ 53,7 53,7 @@ async fn random(args: web::Path<RandomArgs>) -> impl Responder {
let pur = args.purity.clone();
let cats = args.categories.clone();
let q = args.q.clone();
- let api_key = env!("WH_API_KEY");
+ let api_key = std::env::var("WH_API_KEY").unwrap();
let wh_url = format!(
"https://wallhaven.cc/api/v1/search?atleast={atl}&ratios={rats}&purity={pur}&categories={cats}&sorting=random&q={q}&apikey={api_key}"