diff options
author | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-04-30 10:31:54 +0530 |
---|---|---|
committer | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-04-30 10:31:54 +0530 |
commit | d5566eca6444157cdf5c524523a5f26d99904f5d (patch) | |
tree | 88def508f369dbfb4f63393f0c44929c8dc8edcb /server/main.go | |
parent | 57156623533c7cbc0052c5c4401865e7165356c2 (diff) |
added more columns for gst, category and brand of product
Diffstat (limited to 'server/main.go')
-rw-r--r-- | server/main.go | 8 |
1 files changed, 7 insertions, 1 deletions
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) } |