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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user