This commit is contained in:
Neshura 2024-08-07 22:34:10 +02:00
parent 33e668be65
commit 37ec615cbd
Signed by: Neshura
GPG key ID: 4E2D47B1374C297D

View file

@ -203,7 +203,7 @@ async fn upload_file(state: &mut App, request: Request) {
let url = format!("{}/api/Library/scan-folder", var("KAVITA_URL").expect("KAVITA_URL needs to be set in the .env file")); let url = format!("{}/api/Library/scan-folder", var("KAVITA_URL").expect("KAVITA_URL needs to be set in the .env file"));
let request_body = LibraryScanBody { let request_body = LibraryScanBody {
directory: file.format, folder_path: file.format,
api_key: var("KAVITA_API_KEY").expect("KAVITA_API_KEY needs to be set in the .env file") api_key: var("KAVITA_API_KEY").expect("KAVITA_API_KEY needs to be set in the .env file")
}; };
@ -249,6 +249,6 @@ async fn stream_to_file(path: &PathBuf, stream: BodyDataStream) -> Result<(), (S
#[derive(Serialize)] #[derive(Serialize)]
#[serde(rename_all="camelCase")] #[serde(rename_all="camelCase")]
struct LibraryScanBody { struct LibraryScanBody {
directory: String, folder_path: String,
api_key: String, api_key: String,
} }