mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-26 16:46: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'); | 					const confirmBtn = modal.find('.btn-primary'); | ||||||
| 					confirmBtn.html('<i class="fa fa-spinner fa-spin"></i>'); | 					confirmBtn.html('<i class="fa fa-spinner fa-spin"></i>'); | ||||||
| 					confirmBtn.prop('disabled', true); | 					confirmBtn.prop('disabled', true); | ||||||
|  | 					api.del(`/users/${ajaxify.data.uid}/account`, { | ||||||
| 					socket.emit('user.deleteAccount', { |  | ||||||
| 						password: $('#confirm-password').val(), | 						password: $('#confirm-password').val(), | ||||||
| 					}, function (err) { | 					}, function (err) { | ||||||
| 						function restoreButton() { | 						function restoreButton() { | ||||||
| @@ -86,9 +85,7 @@ define('forum/account/edit', [ | |||||||
| 						} | 						} | ||||||
|  |  | ||||||
| 						confirmBtn.html('<i class="fa fa-check"></i>'); | 						confirmBtn.html('<i class="fa fa-check"></i>'); | ||||||
| 						require(['logout'], function (logout) { | 						window.location.href = `${config.relative_path}/`; | ||||||
| 							logout(); |  | ||||||
| 						}); |  | ||||||
| 					}); | 					}); | ||||||
|  |  | ||||||
| 					return false; | 					return false; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user