Fixed bug

You could set the password to be an empty string
This commit is contained in:
2026-06-05 21:35:54 +02:00
parent 390630886e
commit 810d554cb9
2 changed files with 37 additions and 24 deletions
+3 -1
View File
@@ -336,7 +336,7 @@ pub fn login_component() -> Html {
value={(*username).clone()}
oninput={Callback::from(move |e: InputEvent| {
let input: web_sys::HtmlInputElement = e.target_unchecked_into();
username.set(input.value());
username.set(input.value());
})}
/>
<input
@@ -566,6 +566,7 @@ pub fn user_by_id_component(props: &UserProps) -> Html {
let last_name = (*last_name).clone();
let username = (*username).clone();
let make_admin = *make_admin;
let new_pwd_state = new_pwd.clone();
let new_pwd = (*new_pwd).clone();
saving.set(true);
@@ -600,6 +601,7 @@ pub fn user_by_id_component(props: &UserProps) -> Html {
if let Ok(updated) = resp.json::<FilteredUser>().await {
user_state.set(Some(updated));
}
new_pwd_state.set(String::new());
save_success.set(true);
}
Ok(resp) => {