From d5566eca6444157cdf5c524523a5f26d99904f5d Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Fri, 30 Apr 2021 10:31:54 +0530 Subject: added more columns for gst, category and brand of product --- server/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'server/main.go') diff --git a/server/main.go b/server/main.go index 1aa34c3..c75a5de 100644 --- a/server/main.go +++ b/server/main.go @@ -51,6 +51,9 @@ func registerItem(ctx *gin.Context) { desc := ctx.Query("desc") price, _ := strconv.ParseFloat(ctx.Query("price"), 64) hsn, _ := strconv.Atoi(ctx.Query("hsn")) + gst, _ := strconv.ParseFloat(ctx.Query("gst"), 64) + cat := "cat coming soon" + brand := "brand coming soon" // why does it show warnings item := db.Item { @@ -58,7 +61,10 @@ func registerItem(ctx *gin.Context) { desc, price, hsn, + gst, + cat, + brand, } - db.RegisterItem(item.Model, item.Desc, item.Price, item.HSN) + db.RegisterItem(item) } -- cgit v1.2.3