Jelajahi Sumber

public: fix jquery3.x syntax error (#5951)

$.post().success -> $.post().done
guan 5 tahun lalu
induk
melakukan
40214ef109
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      public/js/gogs.js

+ 2 - 2
public/js/gogs.js

@@ -425,7 +425,7 @@ function initRepository() {
             if (confirm($this.data('locale'))) {
                 $.post($this.data('url'), {
                     "_csrf": csrf
-                }).success(function () {
+                }).done(function () {
                     $('#' + $this.data('comment-id')).remove();
                 });
             }
@@ -1310,7 +1310,7 @@ $(document).ready(function () {
                 $.post($this.data('url'), {
                     "_csrf": csrf,
                     "id": $this.data("id")
-                }).success(function (data) {
+                }).done(function (data) {
                     window.location.href = data.redirect;
                 });
             }