Commit 2b8ad4c1 authored by Thushara Thiwanka's avatar Thushara Thiwanka

CREATE: delete assignments integrated

parent eb339ddb
No preview for this file type
......@@ -47,7 +47,7 @@ const ManageAssignments = () => {
className="action-btn x"
onClick={() => {
if (window.confirm("Are you sure to delete this assignment?")) {
deleteHandler(item._id, item.username);
deleteHandler(item.id);
}
}}
>
......@@ -86,7 +86,7 @@ const ManageAssignments = () => {
}
};
const deleteHandler = async (id, username) => {
const deleteHandler = async id => {
try {
const res = await axios.delete(`assignments/${id}`);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment