Add user management routes

Integrate the new user management routes into the main application
router. This commit also includes refactoring of the OpenSubsonic
response types to better accommodate error responses and introduces a
new struct for handling multiple extensions.
This commit is contained in:
vaibhav
2026-02-14 03:06:31 +05:30
parent 9bf9a2296e
commit fcaf70b717
5 changed files with 153 additions and 43 deletions

View File

@@ -9,6 +9,7 @@ use axum::Router;
use dotenvy::dotenv;
use crate::routes::system_router::system_routers;
use crate::routes::user_management_router::user_management_routs;
use crate::state::AppState;
#[tokio::main]
@@ -19,7 +20,7 @@ async fn main() {
.unwrap_or_else(|_| panic!("Error creating pool for {}", database_url));
tracing_subscriber::fmt::init();
let app = Router::new()
.nest("/rest", system_routers())
.nest("/rest", system_routers().merge(user_management_routs()))
.with_state(state);
let listener = tokio::net::TcpListener::bind("0.0.0.0:3311").await.unwrap();