some bug fixed
This commit is contained in:
1 parent
e310ed83b7
commit
bff7788c70
8 files changed
+39
-18
No files matched your search
@@ -20,10 +20,12 @@ changepasswordformbody.addEventListener('submit', async e => {
|
||||
const status = await fetch(routes.change_password_url(), {
|
||||
method: 'POST',
|
||||
body: `{"token":"${localStorage.getItem('token')}","userid":"${changepassuserid}","new_password":"${changepasswordnewpassword.value}"}`
|
||||
}).then(data => data.json()).then(jsondata => jsondata)
|
||||
console.log(status)
|
||||
}).then(data => data.json()).then(jsondata => jsondata).catch((error) => {
|
||||
notification(`Ошибка на сервере: ${error}`, "error")
|
||||
})
|
||||
if (status.status === "ok") {
|
||||
notification("Пароль успешно изменен", "success")
|
||||
changepasswordform.classList.remove('active')
|
||||
changepasswordnewpassword.value = ""
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user