aboutsummaryrefslogtreecommitdiff
path: root/server/router
diff options
context:
space:
mode:
authorMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-07-12 12:14:35 +0530
committerMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-07-12 12:14:35 +0530
commit6baad020ce5037a90d902c8f41f1f37f52419a10 (patch)
tree7b69f6b7b6bc70c2d7edb3e881d8dbf2dca01109 /server/router
parent554a99c96d223eacc4bb6e10e3f6ad1712397f3a (diff)
Added support for more client details in server
Diffstat (limited to 'server/router')
-rw-r--r--server/router/invoice.go3
-rw-r--r--server/router/router.go2
2 files changed, 2 insertions, 3 deletions
diff --git a/server/router/invoice.go b/server/router/invoice.go
index 6544119..865d244 100644
--- a/server/router/invoice.go
+++ b/server/router/invoice.go
@@ -13,7 +13,6 @@ import (
//"net/http"
"fmt"
- //"strconv"
db "github.com/MikunoNaka/openbills/database"
)
@@ -28,7 +27,7 @@ import (
// db.RegisterItem(newItem)
// }
-func previewInvoice(ctx *gin.Context) {
+func registerInvoice(ctx *gin.Context) {
var newInvoice db.Invoice
ctx.Bind(&newInvoice)
fmt.Println(newInvoice)
diff --git a/server/router/router.go b/server/router/router.go
index 5b79fa4..c6ddd65 100644
--- a/server/router/router.go
+++ b/server/router/router.go
@@ -36,7 +36,7 @@ func InitRouter() {
people.POST("/register", registerPerson)
// invoice API routes
- invoice.POST("/preview", previewInvoice)
+ invoice.POST("/preview", registerInvoice)
myRouter.Run(":8080")
}