aboutsummaryrefslogtreecommitdiff
path: root/server/src/routes/ui/account/mod.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-01-22 14:56:46 +0100
committermetamuffin <metamuffin@disroot.org>2023-01-22 14:56:46 +0100
commita8402e7f17e978b839a605d4715ca51b4a76f1f3 (patch)
treece411485725efc6d224a9dce917175af26934126 /server/src/routes/ui/account/mod.rs
parented870d1fc04891e79ab1d40be473a07810a62e69 (diff)
downloadjellything-a8402e7f17e978b839a605d4715ca51b4a76f1f3.tar
jellything-a8402e7f17e978b839a605d4715ca51b4a76f1f3.tar.bz2
jellything-a8402e7f17e978b839a605d4715ca51b4a76f1f3.tar.zst
admin panel
Diffstat (limited to 'server/src/routes/ui/account/mod.rs')
-rw-r--r--server/src/routes/ui/account/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/routes/ui/account/mod.rs b/server/src/routes/ui/account/mod.rs
index bdc6062..e39ef6c 100644
--- a/server/src/routes/ui/account/mod.rs
+++ b/server/src/routes/ui/account/mod.rs
@@ -1,3 +1,4 @@
+pub mod admin;
pub mod session;
use super::error::MyError;
@@ -18,7 +19,7 @@ use rocket::{get, post, uri, FromForm, State};
#[derive(FromForm)]
pub struct RegisterForm {
- #[field(validate = len(8..32))]
+ #[field(validate = len(8..128))]
pub invitation: String,
#[field(validate = len(4..32))]
pub username: String,
@@ -108,7 +109,7 @@ pub fn r_account_register_post<'a>(
Some(&User {
display_name: form.username.clone(),
name: form.username.clone(),
- password: form.password.clone().into(), // TODO hash it
+ password: hash_password(&form.password),
admin: false,
}),
)