mirror of
https://github.com/perstarkse/minne.git
synced 2026-05-30 03:10:45 +02:00
refactor: html-router builder pattern and structure
This commit is contained in:
@@ -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))
|
||||
}
|
||||
Reference in New Issue
Block a user