mirror of
https://github.com/perstarkse/minne.git
synced 2026-04-27 03:08:41 +02:00
20 lines
489 B
Rust
20 lines
489 B
Rust
mod handlers;
|
|
|
|
use axum::{extract::FromRef, routing::get, Router};
|
|
use handlers::{patch_text_content, show_content_page, 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/:id",
|
|
get(show_text_content_edit_form).patch(patch_text_content),
|
|
)
|
|
}
|