feat: Implement person and tag management services
- Added `Person` and `Tag` models to the core library. - Created `PersonService` and `TagService` traits with implementations for managing persons and tags. - Introduced repositories for `Person`, `Tag`, `FaceRegion`, and `PersonShare` with PostgreSQL support. - Updated authorization logic to include permissions for accessing and editing persons. - Enhanced the schema to support new models and relationships. - Implemented database migrations for new tables related to persons and tags. - Added request and response structures for API interactions with persons and tags.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use axum::{Router, routing::get};
|
||||
|
||||
use crate::{
|
||||
handlers::{album_handlers, auth_handlers, media_handlers, user_handlers},
|
||||
handlers::{album_handlers, auth_handlers, media_handlers, person_handlers, tag_handlers, user_handlers},
|
||||
state::AppState,
|
||||
};
|
||||
|
||||
@@ -10,11 +10,17 @@ pub fn api_routes(max_upload_size: usize) -> Router<AppState> {
|
||||
let user_routes = user_handlers::user_routes();
|
||||
let media_routes = media_handlers::media_routes(max_upload_size);
|
||||
let album_routes = album_handlers::album_routes();
|
||||
let media_tag_routes = tag_handlers::tag_routes();
|
||||
let people_routes = person_handlers::people_routes();
|
||||
let face_routes = person_handlers::face_routes();
|
||||
|
||||
Router::new()
|
||||
.route("/api/v1/health", get(|| async { "OK" }))
|
||||
.nest("/api/v1/auth", auth_routes)
|
||||
.nest("/api/v1/users", user_routes)
|
||||
.nest("/api/v1/media", media_routes)
|
||||
.nest("/api/v1/media/{media_id}/tags", media_tag_routes)
|
||||
.nest("/api/v1/albums", album_routes)
|
||||
.nest("/api/v1/people", people_routes)
|
||||
.nest("/api/v1", face_routes)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user