src/static/js/admin-stats.js
// Delete a user's account
Delete a user's account
Delete a user ' s account
function deleteUser(userID, reason) {
  $.ajax({
    url: "/api/deleteUser",
    data: {
      userID,
      reason,
    },
    success: () => {
      hideError();
      updateNotifications();
      populateStats();
      populateUsers();
      populatePosts();
    },
    error: () => {
      showError("Failed to delete user");
    },
  });
}
function deleteUser ( userID , reason ) { $ . ajax ( { url : "/api/deleteUser" , data : { userID , reason , } , success : ( ) => { hideError ( ) ; updateNotifications ( ) ; populateStats ( ) ; populateUsers ( ) ; populatePosts ( ) ; } , error : ( ) => { showError ( "Failed to delete user" ) ; } , } ) ; }
Delete a user's account
Delete a user ' s account