diff --git a/src/PassReset/formHandler.js b/src/PassReset/formHandler.js index 791bb4e..75301f9 100644 --- a/src/PassReset/formHandler.js +++ b/src/PassReset/formHandler.js @@ -23,9 +23,12 @@ formEl.addEventListener('submit', () => { formData.append("field", "password"); formData.append("value", newPW); const object = Object.fromEntries(formData.entries()); - console.log({ object }); + fetch('https://reqres.in/api/update', { + method: 'POST', + body: object + }).then(res => console.log(res)).catch(error => console.log(error)); //TODO: Change this to changing a div in html - alert("Success"); + //alert("Success"); } else { //TODO: Change this to changing a div in html alert("Failure")