aboutsummaryrefslogtreecommitdiff
path: root/server/router
diff options
context:
space:
mode:
authorMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-06-26 03:18:55 +0530
committerMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-06-26 03:18:55 +0530
commitce832a0bddc02a21d9c382f46b81dd6c114f35f9 (patch)
tree96d22a4307573b9f4f82abae5486c8baa8678332 /server/router
parente59c4dee0ab213c2e1f93b494a09fcd3810d7f10 (diff)
Storing HSN as string now
Diffstat (limited to 'server/router')
-rw-r--r--server/router/items.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/router/items.go b/server/router/items.go
index 684d1d8..540fdf3 100644
--- a/server/router/items.go
+++ b/server/router/items.go
@@ -25,7 +25,6 @@ func getAllItems(ctx *gin.Context) {
func registerItem(ctx *gin.Context) {
// extract data not string
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"
@@ -34,7 +33,7 @@ func registerItem(ctx *gin.Context) {
Model: ctx.Query("model"),
Description: ctx.Query("desc"),
UnitPrice: price,
- HSN: hsn,
+ HSN: ctx.Query("hsn"),
TotalGST: gst,
Category: cat,
Brand: brand,