some bug fixed

This commit is contained in:
wt committed 2024-05-24 15:46:22 +07:00
1 parent e310ed83b7
commit bff7788c70
8 files changed
+39 -18

No files matched your search

+4 -2
View File
@@ -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 = ""
}
})