diff --git a/web/app/common/api.js b/web/app/common/api.js index db80d871..dc74374b 100644 --- a/web/app/common/api.js +++ b/web/app/common/api.js @@ -108,7 +108,7 @@ export default { logOut, getConfig, getPostComments, - last, + getLastComments, counts, getComment, getUserComments, diff --git a/web/app/last-comments.js b/web/app/last-comments.js index c83c6e8a..c70826be 100644 --- a/web/app/last-comments.js +++ b/web/app/last-comments.js @@ -5,6 +5,7 @@ import { BASE_URL, DEFAULT_LAST_COMMENTS_MAX, LAST_COMMENTS_NODE_CLASSNAME } fro import api from 'common/api'; import ListComments from 'components/list-comments'; +import {getLastComments} from "./common/api"; if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); @@ -39,7 +40,7 @@ function init() { [].slice.call(nodes).forEach(node => { const max = node.dataset.max || remark_config.max_last_comments || DEFAULT_LAST_COMMENTS_MAX; - api.last({ max, siteId: remark_config.site_id }) + api.getLastComments({ max, siteId: remark_config.site_id }) .then(comments => { try { render(, node);