From f6eb11a23ab645b187c5911ec762a3d6ca58140c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 28 Mar 2018 22:28:33 +0300 Subject: move like API to server --- juick-www/src/main/assets/scripts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'juick-www/src/main/assets') diff --git a/juick-www/src/main/assets/scripts.js b/juick-www/src/main/assets/scripts.js index 9da9ce3c..57ab9ee4 100644 --- a/juick-www/src/main/assets/scripts.js +++ b/juick-www/src/main/assets/scripts.js @@ -519,7 +519,8 @@ function resultMessage(str) { function likeMessage(e, mid) { if (confirm(i18n('message.likeThisMessage?'))) { - fetch('//juick.com/like?mid=' + mid, { + fetch('//api.juick.com/like?mid=' + mid + + '&hash=' + document.getElementById('body').getAttribute('data-hash'), { method: 'POST', credentials: 'same-origin' }) -- cgit v1.2.3