Compare commits
2 commits
33e668be65
...
3abca4c124
Author | SHA1 | Date | |
---|---|---|---|
3abca4c124 | |||
37ec615cbd |
3 changed files with 4 additions and 4 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -34,7 +34,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "api-backend"
|
name = "api-backend"
|
||||||
version = "0.0.5"
|
version = "0.0.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum",
|
"axum",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
authors = ["Neshura"]
|
authors = ["Neshura"]
|
||||||
name = "api-backend"
|
name = "api-backend"
|
||||||
version = "0.0.5"
|
version = "0.0.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "API Backend For Easier Uploading To Kavita"
|
description = "API Backend For Easier Uploading To Kavita"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
|
|
|
@ -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,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue