From 155e4f61253cd5233c5ee44504d696b9402b7419 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 24 Feb 2021 12:07:25 +0300 Subject: pass a bunch of related arrays properly to backend --- js/Headlines.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/Headlines.js') 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); -- cgit v1.2.3