mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
Fixed adding comments order
This commit is contained in:
parent
fdeed0eeec
commit
5841241a42
2 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ async function addComment({state, api, data: comment}) {
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
comments: [...state.comments, commentStructured]
|
comments: [commentStructured, ...state.comments]
|
||||||
// todo: fix pagination now?
|
// todo: fix pagination now?
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ function setupGhostApi({siteUrl = window.location.origin, apiUrl, apiKey}) {
|
||||||
credentials: 'same-origin'
|
credentials: 'same-origin'
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
return res.json()
|
return res.json();
|
||||||
} else {
|
} else {
|
||||||
throw new Error('Failed to fetch comments');
|
throw new Error('Failed to fetch comments');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue