fix: closes #10583, replace removed socket method with api method

isekai-main
Barış Soner Uşaklı 3 years ago
parent bcd219d227
commit 5e82cf23c6

@ -69,8 +69,7 @@ define('forum/account/edit', [
const confirmBtn = modal.find('.btn-primary');
confirmBtn.html('<i class="fa fa-spinner fa-spin"></i>');
confirmBtn.prop('disabled', true);
socket.emit('user.deleteAccount', {
api.del(`/users/${ajaxify.data.uid}/account`, {
password: $('#confirm-password').val(),
}, function (err) {
function restoreButton() {
@ -86,9 +85,7 @@ define('forum/account/edit', [
}
confirmBtn.html('<i class="fa fa-check"></i>');
require(['logout'], function (logout) {
logout();
});
window.location.href = `${config.relative_path}/`;
});
return false;

Loading…
Cancel
Save