From 8207f28c5fb0720eec3d216b23630482e26fece5 Mon Sep 17 00:00:00 2001 From: garrettladley Date: Sun, 25 Feb 2024 14:51:09 -0500 Subject: [PATCH] done --- backend/src/middleware/auth.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/backend/src/middleware/auth.go b/backend/src/middleware/auth.go index dafa3d25b..93a07b5f6 100644 --- a/backend/src/middleware/auth.go +++ b/backend/src/middleware/auth.go @@ -11,7 +11,6 @@ import ( "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/limiter" - "github.com/gofiber/fiber/v2/middleware/skip" ) var paths = []string{ @@ -21,21 +20,6 @@ var paths = []string{ "/api/v1/auth/logout", } -// Deprecated -func (m *AuthMiddlewareService) Skip(h fiber.Handler) fiber.Handler { - return skip.New(h, func(c *fiber.Ctx) bool { - claims, err := auth.From(c) - if err != nil { - _ = err.FiberError(c) - return false - } - if claims == nil { - return false - } - return claims.Role == string(models.Super) - }) -} - func (m *AuthMiddlewareService) DisableAuth(h fiber.Handler) fiber.Handler { return func(c *fiber.Ctx) error { return h(c)