#counts @method -rename

This commit is contained in:
Alex
2018-06-23 22:51:14 +03:00
parent 83d3afa291
commit 17529d0646
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ export const getPostComments = ({ sort, url }) => fetcher.get(`/find?url=${url}&
export const getLastComments = ({ siteId, max }) => fetcher.get(`/last/${max}?site=${siteId}`);
export const counts = ({ urls, siteId }) => fetcher.post({
export const getCommentsCount = ({ urls, siteId }) => fetcher.post({
url: `/counts?site=${siteId}`,
body: urls,
});
@@ -109,7 +109,7 @@ export default {
getConfig,
getPostComments,
getLastComments,
counts,
getCommentsCount,
getComment,
getUserComments,
vote,
+1 -1
View File
@@ -33,7 +33,7 @@ function init() {
return acc;
}, {});
api.counts({ urls: Object.keys(map), siteId: remark_config.site_id })
api.getCommentsCount({ urls: Object.keys(map), siteId: remark_config.site_id })
.then(res => {
res.forEach(item => (map[item.url].innerHTML = item.count));
});