summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs
index 2f3449d..0f6ca87 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -48,11 +48,16 @@ async fn main() -> std::io::Result<()> {
HttpServer::new(move || {
App::new()
.app_data(web::Data::new(app_state.clone()))
- .service(api::api_scope())
- .service(auth::auth_scope())
- .service(SwaggerUi::new("/doc/{_:.*}").url("/docs/openapi.json", openapi.clone()))
- .route("/", web::get().to(redirect_to_docs))
- .route("/doc", web::get().to(redirect_to_docs))
+ .service(
+ SwaggerUi::new("/balalaika/doc/{_:.*}").url("/balalaika/docs/openapi.json", openapi.clone()),
+ )
+ .service(
+ web::scope("/balalaika")
+ .service(api::api_scope())
+ .service(auth::auth_scope())
+ .route("/doc", web::get().to(redirect_to_docs))
+ .route("/", web::get().to(redirect_to_docs))
+ )
})
.bind(("127.0.0.1", 8000))?
.run()
@@ -61,5 +66,5 @@ async fn main() -> std::io::Result<()> {
/* Redirection page */
async fn redirect_to_docs() -> impl Responder {
- Redirect::to("/doc/")
+ Redirect::to("doc/")
}