mirror of
https://github.com/perstarkse/minne.git
synced 2026-06-28 04:46:35 +02:00
99faca05dc
fix fix
27 lines
757 B
Rust
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),
|
|
)
|
|
}
|