change /count endpoint to /counts

This commit is contained in:
igoradamenko
2018-03-11 21:54:57 +03:00
parent 12b2a152a1
commit 338724121f
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -12,8 +12,8 @@ export const find = ({ url }) => fetcher.get(`/find?url=${url}&sort=-score&forma
export const last = ({ siteId, max }) => fetcher.get(`/last/${max}?site=${siteId}`);
export const count = ({ urls, siteId }) => fetcher.post({
url: `/count?site=${siteId}`,
export const counts = ({ urls, siteId }) => fetcher.post({
url: `/counts?site=${siteId}`,
body: urls,
});
@@ -73,7 +73,7 @@ export default {
getConfig,
find,
last,
count,
counts,
getComment,
vote,
send,
+1 -1
View File
@@ -33,7 +33,7 @@ function init() {
return acc;
}, {});
api.count({ urls: Object.keys(map), siteId: remark_config.site_id })
api.counts({ urls: Object.keys(map), siteId: remark_config.site_id })
.then(res => {
res.forEach(item => (map[item.url].innerHTML = item.count));
});