#last @method -rename

This commit is contained in:
Alex
2018-06-23 22:38:55 +03:00
parent 37f9954f11
commit 83d3afa291
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ export default {
logOut,
getConfig,
getPostComments,
last,
getLastComments,
counts,
getComment,
getUserComments,
+2 -1
View File
@@ -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(<ListComments comments={comments}/>, node);