removeswagger ui, itis nice but I don't need it
This commit is contained in:
parent
402b8e3a57
commit
9ebfa27b11
16
Cargo.lock
generated
16
Cargo.lock
generated
@ -587,9 +587,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "4.5.8"
|
version = "4.5.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "84b3edb18336f4df585bc9aa31dd99c036dfa5dc5e9a2939a722a188f3a8970d"
|
checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap_builder",
|
"clap_builder",
|
||||||
"clap_derive",
|
"clap_derive",
|
||||||
@ -597,9 +597,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_builder"
|
name = "clap_builder"
|
||||||
version = "4.5.8"
|
version = "4.5.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c1c09dd5ada6c6c78075d6fd0da3f90d8080651e2d6cc8eb2f1aaa4034ced708"
|
checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anstream",
|
"anstream",
|
||||||
"anstyle",
|
"anstyle",
|
||||||
@ -2599,18 +2599,18 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.203"
|
version = "1.0.204"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094"
|
checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.203"
|
version = "1.0.204"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba"
|
checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -6,7 +6,7 @@ members = [
|
|||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
sea-orm = "0.12.15"
|
sea-orm = "0.12.15"
|
||||||
serde = "1.0.203"
|
serde = "1.0.204"
|
||||||
time = "0.3.36"
|
time = "0.3.36"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
|
@ -35,4 +35,4 @@ Options:
|
|||||||
-V, --version Print version
|
-V, --version Print version
|
||||||
```
|
```
|
||||||
|
|
||||||
The url for koreader is `http://<ADDRESS>/api`.
|
The url for koreader is `http://<ADDRESS>`.
|
||||||
|
@ -10,9 +10,9 @@ repository = { workspace = true }
|
|||||||
entity = { path = "../entity" }
|
entity = { path = "../entity" }
|
||||||
migration = { path = "../migration" }
|
migration = { path = "../migration" }
|
||||||
anyhow = "1.0.86"
|
anyhow = "1.0.86"
|
||||||
clap = { version = "4.5.8", features = ["env", "derive"] }
|
clap = { version = "4.5.9", features = ["env", "derive"] }
|
||||||
poem = "3.0.1"
|
poem = "3.0.1"
|
||||||
poem-openapi = { version = "5.0.2", features = ["swagger-ui"] }
|
poem-openapi = "5.0.2"
|
||||||
sea-orm = { workspace = true, features = ["with-time", "sqlx-sqlite", "sqlx-postgres", "sqlx-mysql", "runtime-tokio-rustls", "macros" ] }
|
sea-orm = { workspace = true, features = ["with-time", "sqlx-sqlite", "sqlx-postgres", "sqlx-mysql", "runtime-tokio-rustls", "macros" ] }
|
||||||
serde = { workspace = true, features = ["derive"] }
|
serde = { workspace = true, features = ["derive"] }
|
||||||
thiserror = "1.0.61"
|
thiserror = "1.0.61"
|
||||||
|
@ -30,7 +30,7 @@ pub async fn run(args: &Config, db_url: &str) -> Result<()> {
|
|||||||
db,
|
db,
|
||||||
});
|
});
|
||||||
|
|
||||||
const API_PATH: &str = "/api";
|
const API_PATH: &str = "/";
|
||||||
let api_uri = Uri::builder()
|
let api_uri = Uri::builder()
|
||||||
.scheme(Scheme::HTTP)
|
.scheme(Scheme::HTTP)
|
||||||
.authority(args.address.clone())
|
.authority(args.address.clone())
|
||||||
@ -38,10 +38,8 @@ pub async fn run(args: &Config, db_url: &str) -> Result<()> {
|
|||||||
.build()?;
|
.build()?;
|
||||||
|
|
||||||
let api_service = OpenApiService::new(Api, "Hesinde Sync", "1.0").server(api_uri.to_string());
|
let api_service = OpenApiService::new(Api, "Hesinde Sync", "1.0").server(api_uri.to_string());
|
||||||
let ui = api_service.swagger_ui();
|
|
||||||
let app = Route::new()
|
let app = Route::new()
|
||||||
.nest(API_PATH, api_service)
|
.nest(API_PATH, api_service)
|
||||||
.nest("/", ui)
|
|
||||||
.data(app_state)
|
.data(app_state)
|
||||||
.with(Tracing);
|
.with(Tracing);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user