[PATCH 1 of 2] follow: Fix args for $.post() call in toggleFollowingRepo()

Ross Thomas ross at lns-nevasoft.com
Sat Feb 8 01:06:05 UTC 2020


# HG changeset patch
# User Ross Thomas <ross at lns-nevasoft.com>
# Date 1581112527 28800
#      Fri Feb 07 13:55:27 2020 -0800
# Branch stable
# Node ID f273a7b53fe035c12a55b6a3e34f849af245d797
# Parent  2571674c4a2fd6247a6dee7d9b4e27df13df1429
follow: Fix args for $.post() call in toggleFollowingRepo()

diff -r 2571674c4a2f -r f273a7b53fe0 kallithea/public/js/base.js
--- a/kallithea/public/js/base.js	Mon Feb 03 20:50:07 2020 +0100
+++ b/kallithea/public/js/base.js	Fri Feb 07 13:55:27 2020 -0800
@@ -457,8 +457,10 @@
 }
 
 var toggleFollowingRepo = function(target, follows_repository_id){
-    var args = 'follows_repository_id=' + follows_repository_id;
-    args += '&_session_csrf_secret_token=' + _session_csrf_secret_token;
+    var args = {
+        'follows_repository_id': follows_repository_id,
+        '_session_csrf_secret_token': _session_csrf_secret_token
+    }
     $.post(TOGGLE_FOLLOW_URL, args, function(data){
             _onSuccessFollow(target);
         });


More information about the kallithea-general mailing list