Renamed variable
Updated endpoints url to match the new api
Changed from using FormData
Change post to put