From 9d941b5d99621bc98df0be3002aa7121f98e7a56 Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Thu, 8 Jul 2021 11:35:30 +0530 Subject: Added basic functionality to send the invoice data to server --- server/router/router.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'server/router/router.go') 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") } -- cgit v1.2.3