mirror of
https://github.com/flibusta-apps/books_downloader.git
synced 2025-12-06 15:05:37 +01:00
Fix
This commit is contained in:
@@ -20,6 +20,7 @@ pub struct Config {
|
||||
pub book_library_url: String,
|
||||
|
||||
pub converter_url: String,
|
||||
pub converter_api_key: String,
|
||||
|
||||
pub sentry_dsn: String
|
||||
}
|
||||
@@ -35,6 +36,7 @@ impl Config {
|
||||
book_library_url: get_env("BOOK_LIBRARY_URL"),
|
||||
|
||||
converter_url: get_env("CONVERTER_URL"),
|
||||
converter_api_key: get_env("CONVERTER_API_KEY"),
|
||||
|
||||
sentry_dsn: get_env("SENTRY_DSN")
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ pub async fn convert_file(file: SpooledTempFile, file_type: String) -> Option<Re
|
||||
let response = client
|
||||
.post(&config::CONFIG.converter_url)
|
||||
.multipart(form)
|
||||
.header("Authorization", &config::CONFIG.converter_api_key)
|
||||
.send().await;
|
||||
|
||||
let response = match response {
|
||||
|
||||
Reference in New Issue
Block a user