js: Use ES6 object literal shorthand syntax.

Generated by ESLint.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-07-20 13:18:43 -07:00
parent b2745f6e41
commit 96dcc0ce6e
189 changed files with 1328 additions and 1326 deletions

View File

@@ -39,9 +39,9 @@ exports.create_ajax_request = function (
});
$.post({
url: url,
data: data,
success: function () {
url,
data,
success() {
$(form_loading).hide();
$(form_error).hide();
$(form_success).show();
@@ -54,7 +54,7 @@ exports.create_ajax_request = function (
}
window.location.replace(redirect_to);
},
error: function (xhr) {
error(xhr) {
$(form_loading).hide();
$(form_error).show().text(JSON.parse(xhr.responseText).msg);
$(form_input_section).show();