hashing password
This commit is contained in:
1 parent
5432e18a77
commit
c26cb038f7
6 files changed
+17
-12
No files matched your search
@@ -17,9 +17,10 @@ cancelchangepassword.addEventListener('click', e => {
|
||||
|
||||
changepasswordformbody.addEventListener('submit', async e => {
|
||||
e.preventDefault()
|
||||
const hashedpassword = await hashPassword(changepasswordnewpassword.value)
|
||||
const status = await fetch(routes.change_password_url(), {
|
||||
method: 'POST',
|
||||
body: `{"token":"${localStorage.getItem('token')}","userid":"${changepassuserid}","new_password":"${changepasswordnewpassword.value}"}`
|
||||
body: `{"token":"${localStorage.getItem('token')}","userid":"${changepassuserid}","new_password":"${hashedpassword}"}`
|
||||
}).then(data => data.json()).then(jsondata => jsondata).catch((error) => {
|
||||
notification(`Ошибка на сервере: ${error}`, "error")
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user