Allow users to deactivate their bots from the website.

(The back end had been in place already.)

(imported from commit ec4b7b3ea39d71d86b0bdc161740e494ce1e13f7)
This commit is contained in:
Steve Howell
2013-07-10 11:26:30 -04:00
parent 227995e971
commit c27e1105e5
2 changed files with 16 additions and 0 deletions

View File

@@ -163,6 +163,19 @@ $(function () {
});
}
});
$("#bots_list").on("click", "button.delete_bot", function (e) {
var email = $(e.target).data('email');
$.ajax({
url: '/json/users/' + encodeURIComponent(email),
type: 'DELETE',
success: function () {
var row = $(e.target).closest("li");
row.remove();
}
});
});
});
}());