//! Admin-only endpoints. Mounted under `/api/v1/admin/*` by
//! `crate::api::routes`. Every handler in this subtree is guarded by
//! `RequireAdmin`, which only accepts session-cookie authentication —
//! bot/API tokens cannot reach admin routes (see
//! `crate::auth::extractor::RequireAdmin`).

pub mod analysis;
pub mod audit;
pub mod crawler;
pub mod health;
pub mod mangas;
pub mod overview;
pub mod resync;
pub mod settings;
pub mod storage;
pub mod system;
pub mod users;

use axum::Router;

use crate::app::AppState;

pub fn routes() -> Router<AppState> {
    Router::new()
        .merge(users::routes())
        .merge(mangas::routes())
        .merge(resync::routes())
        .merge(storage::routes())
        .merge(system::routes())
        .merge(overview::routes())
        .merge(audit::routes())
        .merge(health::routes())
        .merge(crawler::routes())
        .merge(analysis::routes())
        .merge(settings::routes())
}
