mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Fix comment delete endpoint
This commit is contained in:
parent
24d07f6139
commit
cef36682fd
1 changed files with 2 additions and 5 deletions
|
@ -626,14 +626,11 @@ module.exports.updateProject = (id, jsonData, username, token) => (dispatch => {
|
|||
module.exports.deleteComment = (projectId, commentId, topLevelCommentId, token) => (dispatch => {
|
||||
/* TODO fetching/fetched/error states updates for comment deleting */
|
||||
api({
|
||||
uri: `/proxy/comments/project/${projectId}`,
|
||||
uri: `/proxy/comments/project/${projectId}/comment/${commentId}`,
|
||||
authentication: token,
|
||||
withCredentials: true,
|
||||
method: 'DELETE',
|
||||
useCsrf: true,
|
||||
json: {
|
||||
id: commentId
|
||||
}
|
||||
useCsrf: true
|
||||
}, (err, body, res) => {
|
||||
if (err || res.statusCode !== 200) {
|
||||
log.error(err || res.body);
|
||||
|
|
Loading…
Reference in a new issue