Hooked up front end to POST to API endpoint