feat: separate db models from api models

feat: generate openapi docs
This commit is contained in:
2025-02-25 15:06:43 +00:00
parent c61cfde5c1
commit 870995e1fc
16 changed files with 1188 additions and 868 deletions

View File

@ -14,6 +14,7 @@ use lnvps_db::{LNVpsDb, LNVpsDbMysql};
use log::error;
use nostr::Keys;
use nostr_sdk::Client;
use rocket_okapi::swagger_ui::{make_swagger_ui, SwaggerUIConfig};
use std::net::{IpAddr, SocketAddr};
use std::time::Duration;
use tokio::time::sleep;
@ -156,6 +157,13 @@ async fn main() -> Result<(), Error> {
.manage(exchange)
.manage(sender)
.mount("/", api::routes())
.mount(
"/swagger",
make_swagger_ui(&SwaggerUIConfig {
url: "../openapi.json".to_owned(),
..Default::default()
}),
)
.launch()
.await
{