mirror of
https://github.com/perstarkse/minne.git
synced 2026-04-27 03:08:41 +02:00
refactor: better separation of dependencies to crates
node stuff to html crate only
This commit is contained in:
19
html-router/src/routes/ingestion/mod.rs
Normal file
19
html-router/src/routes/ingestion/mod.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
mod handlers;
|
||||
|
||||
use axum::{extract::FromRef, routing::get, Router};
|
||||
use handlers::{hide_ingress_form, process_ingress_form, show_ingress_form};
|
||||
|
||||
use crate::html_state::HtmlState;
|
||||
|
||||
pub fn router<S>() -> Router<S>
|
||||
where
|
||||
S: Clone + Send + Sync + 'static,
|
||||
HtmlState: FromRef<S>,
|
||||
{
|
||||
Router::new()
|
||||
.route(
|
||||
"/ingress-form",
|
||||
get(show_ingress_form).post(process_ingress_form),
|
||||
)
|
||||
.route("/hide-ingress-form", get(hide_ingress_form))
|
||||
}
|
||||
Reference in New Issue
Block a user