Archived
📦 NEW: backend PUT /comments
This commit is contained in:
1 parent
6848c790ed
commit
ea5ee96845
5 files changed
+86
-66
No files matched your search
@@ -14,7 +14,7 @@ const CommentCard = forwardRef((props, ref) => {
|
||||
props.manageComment.setLoadingComments(true);
|
||||
if (isAuth && user.token != undefined) {
|
||||
try {
|
||||
await api.delete(`/comments?commentId=${props.id}`, { headers: { 'Authorization': user.token } });
|
||||
await api.delete(`/comments/${props.id}`, { headers: { 'Authorization': user.token } });
|
||||
const newCommentsData = { ...props.manageComment.commentsData };
|
||||
const commentIndex = newCommentsData.rows.findIndex((value) => value.id === props.id);
|
||||
newCommentsData.rows.splice(commentIndex, 1);
|
||||
|
||||
Reference in new issue
Block a user