summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-24 12:07:25 +0300
committerAndrew Dolgov <[email protected]>2021-02-24 12:07:25 +0300
commit155e4f61253cd5233c5ee44504d696b9402b7419 (patch)
treec4406fd5245cffbe5954b868d6bfc49bfd755b60 /js
parent96182597c41e2e9a79cbf0d98a5eb140cddc72e3 (diff)
pass a bunch of related arrays properly to backend
Diffstat (limited to 'js')
-rw-r--r--js/Feeds.js2
-rwxr-xr-xjs/Headlines.js8
2 files changed, 5 insertions, 5 deletions
diff --git a/js/Feeds.js b/js/Feeds.js
index d4bdd01b6..5d64b77ee 100644
--- a/js/Feeds.js
+++ b/js/Feeds.js
@@ -134,7 +134,7 @@ const Feeds = {
this.reloadCurrent();
},
requestCounters: function(feed_ids = null) {
- xhr.json("backend.php", {op: "rpc", method: "getAllCounters", feed_ids: feed_ids, seq: App.next_seq()}, () => {
+ xhr.json("backend.php", {op: "rpc", method: "getAllCounters", "feed_ids[]": feed_ids, seq: App.next_seq()}, () => {
//
});
},
diff --git a/js/Headlines.js b/js/Headlines.js
index 18c7cda2e..8baf93671 100755
--- a/js/Headlines.js
+++ b/js/Headlines.js
@@ -150,19 +150,19 @@ const Headlines = {
if (ops.tmark.length != 0)
promises.push(xhr.post("backend.php",
- {op: "rpc", method: "markSelected", ids: ops.tmark.toString(), cmode: 2}));
+ {op: "rpc", method: "markSelected", "ids[]": ops.tmark, cmode: 2}));
if (ops.tpub.length != 0)
promises.push(xhr.post("backend.php",
- {op: "rpc", method: "publishSelected", ids: ops.tpub.toString(), cmode: 2}));
+ {op: "rpc", method: "publishSelected", "ids[]": ops.tpub, cmode: 2}));
if (ops.read.length != 0)
promises.push(xhr.post("backend.php",
- {op: "rpc", method: "catchupSelected", ids: ops.read.toString(), cmode: 0}));
+ {op: "rpc", method: "catchupSelected", "ids[]": ops.read, cmode: 0}));
if (ops.unread.length != 0)
promises.push(xhr.post("backend.php",
- {op: "rpc", method: "catchupSelected", ids: ops.unread.toString(), cmode: 1}));
+ {op: "rpc", method: "catchupSelected", "ids[]": ops.unread, cmode: 1}));
const scores = Object.keys(ops.rescore);