From 625ea9193202f678ab2799283ddfe2b282ba1e90 Mon Sep 17 00:00:00 2001 From: Jokler Date: Mon, 5 Oct 2026 16:07:20 +0200 Subject: Add user creation --- src/main.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 0f39622..c5de543 100644 --- a/src/main.rs +++ b/src/main.rs @@ -100,10 +100,14 @@ async fn main() -> std::io::Result<()> { .route("/settings", web::get().to(user::settings)) .route("/reset-password", web::post().to(user::reset_password)) .route("/logout", web::get().to(user::logout)) + .route("/admin", web::get().to(admin::handle_index)) .service( - web::resource("/admin") - .route(web::get().to(admin::index)) - .route(web::post().to(admin::create_user)), + web::scope("/admin") + .route("/create-user", web::post().to(admin::handle_create_user)) + .route( + "/change-password", + web::post().to(admin::handle_change_password), + ), ) .service(actix_files::Files::new("/static", "static/")) }) -- cgit v1.3.1