From 8d85b0f87590b0941dfb2d8815aa2c7b7462a89f Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 4 Dec 2022 19:14:41 +0530 Subject: saving and checking refreshToken in DB --- brand/router.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'brand') diff --git a/brand/router.go b/brand/router.go index 75c4eb4..b5522dc 100644 --- a/brand/router.go +++ b/brand/router.go @@ -18,6 +18,7 @@ package brand import ( + "github.com/MikunoNaka/OpenBills-server/auth" "github.com/gin-gonic/gin" "go.mongodb.org/mongo-driver/bson/primitive" "log" @@ -27,6 +28,7 @@ import ( func Routes(route *gin.Engine) { b := route.Group("/brand") + b.Use(auth.Authorize()) { b.GET("/all", func(ctx *gin.Context) { // TODO: add functionality to filter results -- cgit v1.2.3