From 165d47723a484ba84acf13d62f7ae8e4f1392347 Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Thu, 8 Jul 2021 09:11:45 +0530 Subject: polished how POST requests work on both front and back end --- src/components/Form/People/RegisterPersonForm.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/components/Form/People/RegisterPersonForm.tsx') diff --git a/src/components/Form/People/RegisterPersonForm.tsx b/src/components/Form/People/RegisterPersonForm.tsx index 66de169..9e3b155 100644 --- a/src/components/Form/People/RegisterPersonForm.tsx +++ b/src/components/Form/People/RegisterPersonForm.tsx @@ -39,13 +39,7 @@ const RegisterPersonForm: React.FC = (props) => { // TODO: show confirmation before being invisible // TODO: Implement override protection - axios.post( - `/api/people/register/` - + `?name=${newClient.Name}` - + `&phone=${newClient.Phone}` - + `&email=${newClient.Email}` - + `&address=${newClient.Address}` - ) + axios.post("/api/people/register", newClient) .then((res) => { console.log(res); props.updatePeopleList(); -- cgit v1.2.3