hashing password

This commit is contained in:
wt committed 2024-12-04 10:27:53 +07:00
1 parent 5432e18a77
commit c26cb038f7
6 files changed
+17 -12

No files matched your search

+4 -1
View File
@@ -38,7 +38,10 @@ changeuserformbody.addEventListener('submit', async (e) => {
is_superuser: changeuserformissuperuser.checked ? "1" : "0",
group: changeuserformgroup.value
};
if (changeuserformpassword.value !== "") {request = {...request, "password": changeuserformpassword.value}}
if (changeuserformpassword.value !== "") {
const hashedpassword = await hashPassword(changeuserformpassword.value)
request = {...request, "password": hashedpassword}
}
const status = await fetch(routes.change_user(), {
method: 'POST',
body: JSON.stringify(request)