From 17529d0646a11e4d4e31c5b630f5ed8834dd9238 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 23 Jun 2018 22:51:14 +0300 Subject: [PATCH] #counts @method -rename --- web/app/common/api.js | 4 ++-- web/app/counter.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/app/common/api.js b/web/app/common/api.js index dc74374b..93683572 100644 --- a/web/app/common/api.js +++ b/web/app/common/api.js @@ -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, diff --git a/web/app/counter.js b/web/app/counter.js index 2c850233..3d0dd7df 100644 --- a/web/app/counter.js +++ b/web/app/counter.js @@ -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)); });