aboutsummaryrefslogtreecommitdiff
path: root/server/router/router.go
diff options
context:
space:
mode:
authorMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-07-08 11:35:30 +0530
committerMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-07-08 11:35:30 +0530
commit9d941b5d99621bc98df0be3002aa7121f98e7a56 (patch)
tree1ad27c269dc1d0ea98cf688df30df396b6acd5f2 /server/router/router.go
parent6167f02d9dee6028987bef53fe658904d47e2d3f (diff)
Added basic functionality to send the invoice data to server
Diffstat (limited to 'server/router/router.go')
-rw-r--r--server/router/router.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/router/router.go b/server/router/router.go
index 9da6d1e..5b79fa4 100644
--- a/server/router/router.go
+++ b/server/router/router.go
@@ -21,10 +21,11 @@ func InitRouter() {
myRouter.Use(static.Serve("/",
static.LocalFile("./app", true)))
- // define routes
+ // define groups
api := myRouter.Group("/api")
- people := api.Group("/people")
items := api.Group("/items")
+ people := api.Group("/people")
+ invoice := api.Group("/invoice")
// items API routes
items.GET("/get-all", getAllItems)
@@ -34,5 +35,8 @@ func InitRouter() {
people.GET("/get-all", getAllPeople)
people.POST("/register", registerPerson)
+ // invoice API routes
+ invoice.POST("/preview", previewInvoice)
+
myRouter.Run(":8080")
}