feat(backend): errors move to pkg

This commit is contained in:
pycook
2025-05-05 21:08:45 +08:00
parent 1ea969e0d9
commit 065f4f787f
18 changed files with 118 additions and 172 deletions

View File

@@ -7,12 +7,12 @@ import (
"go.uber.org/zap"
"github.com/veops/oneterm/internal/acl"
"github.com/veops/oneterm/internal/api/controller"
"github.com/veops/oneterm/pkg/errors"
"github.com/veops/oneterm/pkg/logger"
)
var (
errUnauthorized = &controller.ApiError{Code: controller.ErrUnauthorized}
errUnauthorized = &errors.ApiError{Code: errors.ErrUnauthorized}
)
func AuthMiddleware() gin.HandlerFunc {