diff --git a/src/components/Manager.jsx b/src/components/Manager.jsx index 2c9e618..eb25883 100755 --- a/src/components/Manager.jsx +++ b/src/components/Manager.jsx @@ -134,8 +134,8 @@ const Manager = () => { "Do you really want to delete this password?" ); if (confirmDelete) { - setPasswordArray(passwordArray.filter((item) => item.id !== id)); - await fetch("http://localhost:3000/", { + setPasswordArray(passwordArray.filter((item) => item._id !== id)); + await fetch(`http://localhost:3000/${id}`, { method: "DELETE", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ id }), @@ -409,7 +409,7 @@ const Manager = () => { { - deletePassword(item.id); + deletePassword(item._id); }} >