aboutsummaryrefslogtreecommitdiff
path: root/server/router/router.go
diff options
context:
space:
mode:
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")
}