diff options
author | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-07-08 09:11:45 +0530 |
---|---|---|
committer | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-07-08 09:11:45 +0530 |
commit | 165d47723a484ba84acf13d62f7ae8e4f1392347 (patch) | |
tree | 1cf092e8aa05e5037e9cd8a6f4bf2dd1696ef729 /src/components/Form/People/RegisterPersonForm.tsx | |
parent | 177427b5821a67e141236e6aeb4db12d76b050a0 (diff) |
polished how POST requests work on both front and back end
Diffstat (limited to 'src/components/Form/People/RegisterPersonForm.tsx')
-rw-r--r-- | src/components/Form/People/RegisterPersonForm.tsx | 8 |
1 files changed, 1 insertions, 7 deletions
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> = (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(); |