From 40214ef109fda6d0ca1e7cc188cbaa3976c1e194 Mon Sep 17 00:00:00 2001 From: guan <33579835+g-u-a-n@users.noreply.github.com> Date: Fri, 28 Feb 2020 22:52:26 +0800 Subject: [PATCH] public: fix jquery3.x syntax error (#5951) $.post().success -> $.post().done --- public/js/gogs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/gogs.js b/public/js/gogs.js index b7b30cb47..2d2aa0913 100644 --- a/public/js/gogs.js +++ b/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; }); }