30 lines
770 B
Rust
30 lines
770 B
Rust
//! API Routes
|
|
//!
|
|
//! Defines the API endpoints and maps them to handler functions.
|
|
|
|
use crate::state::AppState;
|
|
use axum::Router;
|
|
|
|
pub mod admin;
|
|
pub mod admin_providers;
|
|
pub mod auth;
|
|
pub mod channels;
|
|
pub mod config;
|
|
pub mod files;
|
|
pub mod iptv;
|
|
pub mod library;
|
|
|
|
/// Construct the API v1 router
|
|
pub fn api_v1_router() -> Router<AppState> {
|
|
Router::new()
|
|
.nest("/admin", admin::router())
|
|
.nest("/admin/providers", admin_providers::router())
|
|
.nest("/auth", auth::router())
|
|
.nest("/channels", channels::router())
|
|
.nest("/config", config::router())
|
|
.nest("/files", files::router())
|
|
.nest("/iptv", iptv::router())
|
|
.nest("/library", library::router())
|
|
.nest("/admin", library::admin_router())
|
|
}
|