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

@@ -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()),
)
}