refactor: html-router builder pattern and structure

This commit is contained in:
Per Stark
2025-03-25 12:03:05 +01:00
parent 9fd83b26cd
commit 0bc147cfc5
38 changed files with 1050 additions and 938 deletions
@@ -0,0 +1,14 @@
mod handlers;
use axum::{extract::FromRef, routing::get, Router};
use handlers::search_result_handler;
use crate::html_state::HtmlState;
pub fn router<S>() -> Router<S>
where
S: Clone + Send + Sync + 'static,
HtmlState: FromRef<S>,
{
Router::new().route("/search", get(search_result_handler))
}