Files
minne/html-router/src/routes/content/mod.rs
T
Per Stark 99faca05dc release: 1.0.5
fix

fix
2026-06-26 12:31:03 +02:00

27 lines
757 B
Rust

mod handlers;
use axum::{Router, extract::FromRef, routing::get};
use handlers::{
delete_text_content, patch_text_content, show_content_page, show_content_read_modal,
show_recent_content, show_text_content_edit_form,
};
use crate::html_state::HtmlState;
pub fn router<S>() -> Router<S>
where
S: Clone + Send + Sync + 'static,
HtmlState: FromRef<S>,
{
Router::new()
.route("/content", get(show_content_page))
.route("/content/recent", get(show_recent_content))
.route("/content/{id}/read", get(show_content_read_modal))
.route(
"/content/{id}",
get(show_text_content_edit_form)
.patch(patch_text_content)
.delete(delete_text_content),
)
}