mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
Allow user to change their API key.
(imported from commit b7c50779d0209c6e6600b59c8760a81273fe2454)
This commit is contained in:
@@ -220,7 +220,18 @@ $(function () {
|
||||
|
||||
});
|
||||
|
||||
|
||||
$("#show_api_key_box").on("click", "button.regenerate_api_key", function (e) {
|
||||
$.ajax({
|
||||
url: '/json/users/me/api_key/regenerate',
|
||||
type: 'POST',
|
||||
success: function (data) {
|
||||
$('#api_key_value').text(data.api_key);
|
||||
},
|
||||
error: function (xhr) {
|
||||
$('#user_api_key_error').text(JSON.parse(xhr.responseText).msg).show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user