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/Items/RegisterItemForm.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/components/Form/Items/RegisterItemForm.tsx') diff --git a/src/components/Form/Items/RegisterItemForm.tsx b/src/components/Form/Items/RegisterItemForm.tsx index c782df5..886628c 100644 --- a/src/components/Form/Items/RegisterItemForm.tsx +++ b/src/components/Form/Items/RegisterItemForm.tsx @@ -47,14 +47,7 @@ const RegisterItemForm: React.FC = (props) => { // TODO: show confirmation before being invisible // TODO: Implement override protection - axios.post( - `/api/items/register/` - + `?model=${newItem.Model}` - + `&desc=${newItem.Description}` - + `&price=${newItem.UnitPrice}` - + `&hsn=${newItem.HSN}` - + `&gst=${newItem.TotalGST}` - ) + axios.post("/api/items/register", newItem) .then((res) => { console.log(res); hideSelf(); -- cgit v1.2.3