summaryrefslogtreecommitdiff
path: root/brand
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-12-04 19:14:41 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-12-04 19:14:41 +0530
commit8d85b0f87590b0941dfb2d8815aa2c7b7462a89f (patch)
tree9399f22b2c1a2850f8762da69da344f0fc830fba /brand
parenta6737e7f233c43c8222faabca991d8c666837c05 (diff)
saving and checking refreshToken in DB
Diffstat (limited to 'brand')
-rw-r--r--brand/router.go2
1 files changed, 2 insertions, 0 deletions
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