fix: issues

This commit is contained in:
yanghao05
2025-04-25 21:19:03 +08:00
parent b35abb2090
commit 5bc3ae468d
15 changed files with 129 additions and 64 deletions

View File

@@ -1,10 +1,16 @@
package middlewares
import (
"strings"
"github.com/gofiber/fiber/v3"
)
func (f *Middlewares) AuthAdmin(ctx fiber.Ctx) error {
if !strings.HasPrefix(ctx.Path(), "/v1/admin") {
return ctx.Next()
}
if ctx.Path() == "/v1/admin/auth" {
return ctx.Next()
}