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:
@@ -1,5 +1,5 @@
|
||||
use crate::state::AppState;
|
||||
use crate::types::types::SubSonicResponses;
|
||||
use crate::types::types::OpenSubSonicResponses;
|
||||
use axum::{Json, Router, http::StatusCode, routing::get};
|
||||
|
||||
pub fn system_routers() -> Router<AppState> {
|
||||
@@ -9,9 +9,9 @@ pub fn system_routers() -> Router<AppState> {
|
||||
)
|
||||
}
|
||||
|
||||
async fn get_opensubsonic_extentions() -> (StatusCode, Json<SubSonicResponses>) {
|
||||
async fn get_opensubsonic_extentions() -> (StatusCode, Json<OpenSubSonicResponses>) {
|
||||
(
|
||||
StatusCode::OK,
|
||||
Json(SubSonicResponses::open_subsonic_extentions()),
|
||||
Json(OpenSubSonicResponses::open_subsonic_extentions()),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user