diff --git a/client/coral-framework/store/actions/items.js b/client/coral-framework/store/actions/items.js index 82bcca52f..7c5c908f9 100644 --- a/client/coral-framework/store/actions/items.js +++ b/client/coral-framework/store/actions/items.js @@ -183,7 +183,7 @@ export function postItem (data, type, id) { method: 'POST', body: JSON.stringify(item) } - return fetch('/v1/item', options) + return fetch('api/v1/' + type, options) .then( response => { return response.ok ? response.json() @@ -191,7 +191,6 @@ export function postItem (data, type, id) { } ) .then((json) => { - // Patch until ID is returned from backend dispatch(addItem(json)) return json.id }) diff --git a/client/coral-plugin-commentbox/CommentBox.js b/client/coral-plugin-commentbox/CommentBox.js index f20ced54c..6d56ecfde 100644 --- a/client/coral-plugin-commentbox/CommentBox.js +++ b/client/coral-plugin-commentbox/CommentBox.js @@ -25,10 +25,10 @@ class CommentBox extends Component { let related if (reply) { comment.parent_id = item_id - related = 'child' + related = 'children' } else { comment.asset_id = item_id - related = 'comment' + related = 'comments' } updateItem(item_id, 'showReply', false) postItem(comment, 'comment')