removeswagger ui, itis nice but I don't need it
This commit is contained in:
parent
402b8e3a57
commit
9ebfa27b11
6 changed files with 14 additions and 16 deletions
|
@ -10,9 +10,9 @@ repository = { workspace = true }
|
|||
entity = { path = "../entity" }
|
||||
migration = { path = "../migration" }
|
||||
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-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" ] }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
thiserror = "1.0.61"
|
||||
|
|
|
@ -34,7 +34,7 @@ struct UserCreated {
|
|||
username: String,
|
||||
}
|
||||
|
||||
/// Datafor pushing progress.
|
||||
/// Data for pushing progress.
|
||||
#[derive(Debug, Clone, Object, Deserialize)]
|
||||
pub struct DocumentUpdate {
|
||||
pub device: String,
|
||||
|
|
|
@ -30,7 +30,7 @@ pub async fn run(args: &Config, db_url: &str) -> Result<()> {
|
|||
db,
|
||||
});
|
||||
|
||||
const API_PATH: &str = "/api";
|
||||
const API_PATH: &str = "/";
|
||||
let api_uri = Uri::builder()
|
||||
.scheme(Scheme::HTTP)
|
||||
.authority(args.address.clone())
|
||||
|
@ -38,10 +38,8 @@ pub async fn run(args: &Config, db_url: &str) -> Result<()> {
|
|||
.build()?;
|
||||
|
||||
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()
|
||||
.nest(API_PATH, api_service)
|
||||
.nest("/", ui)
|
||||
.data(app_state)
|
||||
.with(Tracing);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue