From a6737e7f233c43c8222faabca991d8c666837c05 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 4 Dec 2022 18:04:57 +0530 Subject: added (untested) auth mechanism --- item/router.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'item') diff --git a/item/router.go b/item/router.go index 299e943..4cdd633 100644 --- a/item/router.go +++ b/item/router.go @@ -19,6 +19,7 @@ package item import ( "github.com/gin-gonic/gin" + "github.com/MikunoNaka/OpenBills-server/auth" "go.mongodb.org/mongo-driver/bson/primitive" "log" "net/http" @@ -26,6 +27,7 @@ import ( func Routes(route *gin.Engine) { i := route.Group("/item") + i.Use(auth.Authorize()) { // TODO: add functionality to filter results // /all returns all the saved items -- cgit v1.2.3