mirror of
https://github.com/get-drexa/drive.git
synced 2026-02-02 16:11:17 +00:00
test(backend): add ErrorHandler to HTTP tests
This commit is contained in:
@@ -17,6 +17,7 @@ import (
|
||||
"github.com/get-drexa/drexa/internal/account"
|
||||
"github.com/get-drexa/drexa/internal/auth"
|
||||
"github.com/get-drexa/drexa/internal/database"
|
||||
"github.com/get-drexa/drexa/internal/httperr"
|
||||
"github.com/get-drexa/drexa/internal/organization"
|
||||
"github.com/get-drexa/drexa/internal/password"
|
||||
"github.com/get-drexa/drexa/internal/user"
|
||||
@@ -247,7 +248,9 @@ func newAuthApp(t *testing.T, ctx context.Context) *fiber.App {
|
||||
SecretKey: []byte("drexa-test-secret"),
|
||||
})
|
||||
|
||||
app := fiber.New()
|
||||
app := fiber.New(fiber.Config{
|
||||
ErrorHandler: httperr.ErrorHandler,
|
||||
})
|
||||
api := app.Group("/api")
|
||||
auth.NewHTTPHandler(authSvc, orgSvc, db, auth.CookieConfig{}).RegisterRoutes(api)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user