summaryrefslogtreecommitdiff
path: root/item
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-12-04 18:04:57 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-12-04 18:04:57 +0530
commita6737e7f233c43c8222faabca991d8c666837c05 (patch)
treec00c46ab331f8963b78817776b0d135f513097ba /item
parent11bc12b1f12ed794f0a53a3b0d539a16dc8bd04a (diff)
added (untested) auth mechanism
Diffstat (limited to 'item')
-rw-r--r--item/router.go2
1 files changed, 2 insertions, 0 deletions
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