fixed the PUT routes when the user clicks on the submit-edit button