Skip to content

Commit a4c7ad9

Browse files
authored
Fix usage of removed jqXHR.success (#11379)
Introduced by b57a735 via removal of jQuery-Migrate. This PR changes usage of .success on jqXHR to .done. Fixes #11228 and few other places, such as removal of code comments.
1 parent 6a02a4f commit a4c7ad9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

web_src/js/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ async function initRepository() {
819819
$.post(update_url, {
820820
_csrf: csrf,
821821
target_branch: targetBranch
822-
}).success((data) => {
822+
}).done((data) => {
823823
$branchTarget.text(data.base_branch);
824824
}).always(() => {
825825
reload();
@@ -1044,7 +1044,7 @@ async function initRepository() {
10441044
if (window.confirm($this.data('locale'))) {
10451045
$.post($this.data('url'), {
10461046
_csrf: csrf
1047-
}).success(() => {
1047+
}).done(() => {
10481048
$(`#${$this.data('comment-id')}`).remove();
10491049
});
10501050
}
@@ -2192,7 +2192,7 @@ function initU2FAuth() {
21922192
}
21932193
u2fApi.ensureSupport()
21942194
.then(() => {
2195-
$.getJSON(`${AppSubUrl}/user/u2f/challenge`).success((req) => {
2195+
$.getJSON(`${AppSubUrl}/user/u2f/challenge`).done((req) => {
21962196
u2fApi.sign(req.appId, req.challenge, req.registeredKeys, 30)
21972197
.then(u2fSigned)
21982198
.catch((err) => {
@@ -2288,7 +2288,7 @@ function u2fRegisterRequest() {
22882288
$.post(`${AppSubUrl}/user/settings/security/u2f/request_register`, {
22892289
_csrf: csrf,
22902290
name: $('#nickname').val()
2291-
}).success((req) => {
2291+
}).done((req) => {
22922292
$('#nickname').closest('div.field').removeClass('error');
22932293
$('#register-device').modal('show');
22942294
if (req.registeredKeys === null) {

0 commit comments

Comments
 (0)