mirror of
https://github.com/perstarkse/minne.git
synced 2026-04-27 19:27:07 +02:00
refactor: better separation of dependencies to crates
node stuff to html crate only
This commit is contained in:
24
html-router/src/routes/account/mod.rs
Normal file
24
html-router/src/routes/account/mod.rs
Normal file
@@ -0,0 +1,24 @@
|
||||
mod handlers;
|
||||
use axum::{
|
||||
extract::FromRef,
|
||||
routing::{delete, get, patch, post},
|
||||
Router,
|
||||
};
|
||||
|
||||
use crate::html_state::HtmlState;
|
||||
|
||||
pub fn router<S>() -> Router<S>
|
||||
where
|
||||
S: Clone + Send + Sync + 'static,
|
||||
HtmlState: FromRef<S>,
|
||||
{
|
||||
Router::new()
|
||||
.route("/account", get(handlers::show_account_page))
|
||||
.route("/set-api-key", post(handlers::set_api_key))
|
||||
.route("/update-timezone", patch(handlers::update_timezone))
|
||||
.route(
|
||||
"/change-password",
|
||||
get(handlers::show_change_password).patch(handlers::change_password),
|
||||
)
|
||||
.route("/delete-account", delete(handlers::delete_account))
|
||||
}
|
||||
Reference in New Issue
Block a user