#counts @method -rename
This commit is contained in:
@@ -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
@@ -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));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user