mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: closes #10583, replace removed socket method with api method
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user