feat: Add public album routes and enhance authorization checks for media and albums

This commit is contained in:
2025-11-15 17:18:14 +01:00
parent 199544d1c3
commit a9805b5eb1
16 changed files with 323 additions and 92 deletions

View File

@@ -1,7 +1,10 @@
use axum::{Router, routing::get};
use crate::{
handlers::{album_handlers, auth_handlers, media_handlers, person_handlers, tag_handlers, user_handlers},
handlers::{
album_handlers, auth_handlers, media_handlers, person_handlers, public_handlers,
tag_handlers, user_handlers,
},
state::AppState,
};
@@ -13,9 +16,11 @@ pub fn api_routes(max_upload_size: usize) -> Router<AppState> {
let media_tag_routes = tag_handlers::tag_routes();
let people_routes = person_handlers::people_routes();
let face_routes = person_handlers::face_routes();
let public_routes = public_handlers::public_routes();
Router::new()
.route("/api/v1/health", get(|| async { "OK" }))
.nest("/api/v1", public_routes)
.nest("/api/v1/auth", auth_routes)
.nest("/api/v1/users", user_routes)
.nest("/api/v1/media", media_routes)