diff --git a/routes/api.go b/routes/api.go index 97b28e4..8be22c4 100644 --- a/routes/api.go +++ b/routes/api.go @@ -1,8 +1,6 @@ package routes import ( - "github.com/lanvard/contract/inter" - "github.com/lanvard/foundation/http/outcome" . "github.com/lanvard/routing" "lanvard/src/controllers" ) diff --git a/src/adapters/user.go b/src/adapters/user.go index da89ace..2b7c651 100644 --- a/src/adapters/user.go +++ b/src/adapters/user.go @@ -22,7 +22,7 @@ var User = struct { OneByRequest: func(request inter.Request) (contract.User, error) { var err error - userId := request.UrlValues().Number("user") + userId := request.UrlValue("user").Number() user := model.NewUser(userId, "test@lanvard.com") return user, err diff --git a/test/helper.go b/test/helper.go index 39cd30b..279b7f9 100644 --- a/test/helper.go +++ b/test/helper.go @@ -21,6 +21,7 @@ func ResponseByRequest(request inter.Request) inter.Response { (*net.ResponseWriter)(nil), response, ) + request = request.SetApp(app) kernel := app.Make((*inter.HttpKernel)(nil)).(foundation.Kernel)