mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
Merge pull request #2228 from paulkaplan/update-comments-endpoints
Update the comment routes
This commit is contained in:
commit
ecb497b30f
1 changed files with 2 additions and 2 deletions
|
@ -379,7 +379,7 @@ module.exports.getFavedStatus = (id, username, token) => (dispatch => {
|
|||
module.exports.getTopLevelComments = (id, offset, isAdmin, token) => (dispatch => {
|
||||
dispatch(module.exports.setFetchStatus('comments', module.exports.Status.FETCHING));
|
||||
api({
|
||||
uri: `${isAdmin ? '/admin' : ''}/comments/project/${id}`,
|
||||
uri: `${isAdmin ? '/admin' : ''}/projects/${id}/comments`,
|
||||
authentication: isAdmin ? token : null,
|
||||
params: {offset: offset || 0}
|
||||
}, (err, body) => {
|
||||
|
@ -404,7 +404,7 @@ module.exports.getReplies = (projectId, commentIds, isAdmin, token) => (dispatch
|
|||
const fetchedReplies = {};
|
||||
async.eachLimit(commentIds, 10, (parentId, callback) => {
|
||||
api({
|
||||
uri: `${isAdmin ? '/admin' : ''}/comments/project/${projectId}/${parentId}`,
|
||||
uri: `${isAdmin ? '/admin' : ''}/projects/${projectId}/comments/${parentId}/replies`,
|
||||
authentication: isAdmin ? token : null
|
||||
}, (err, body) => {
|
||||
if (err) {
|
||||
|
|
Loading…
Reference in a new issue