mirror of
https://github.com/Jackzmc/storage.git
synced 2025-05-10 15:03:21 +00:00
Add register page
This commit is contained in:
parent
8b401b6bc6
commit
1c561e58f7
5 changed files with 96 additions and 3 deletions
|
@ -108,7 +108,7 @@ async fn rocket() -> _ {
|
|||
api::library::move_file, api::library::upload_file, api::library::download_file, api::library::list_files, api::library::get_file, api::library::delete_file,
|
||||
])
|
||||
.mount("/auth", routes![
|
||||
ui::auth::login
|
||||
ui::auth::login, ui::auth::login_handler, ui::auth::register, ui::auth::register_handler,
|
||||
])
|
||||
.mount("/", routes![
|
||||
ui::help::about,
|
||||
|
|
|
@ -6,8 +6,21 @@ pub async fn login(route: &Route) -> Template {
|
|||
Template::render("auth/login", context! { route: route.uri.path() })
|
||||
|
||||
}
|
||||
|
||||
#[post("/login")]
|
||||
pub async fn login_handler(route: &Route) -> Template {
|
||||
Template::render("auth/login", context! { route: route.uri.path() })
|
||||
|
||||
}
|
||||
|
||||
#[get("/register")]
|
||||
pub async fn register(route: &Route) -> Template {
|
||||
Template::render("auth/register", context! { route: route.uri.path() })
|
||||
|
||||
}
|
||||
|
||||
#[post("/register")]
|
||||
pub async fn register_handler(route: &Route) -> Template {
|
||||
Template::render("auth/register", context! { route: route.uri.path() })
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue