Skip to content

Commit

Permalink
Lanvard#42 check if value is present
Browse files Browse the repository at this point in the history
  • Loading branch information
Reindert Vetter committed May 17, 2020
1 parent 9670680 commit 32204f3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions routes/api.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "[email protected]")
return user, err
Expand Down
1 change: 1 addition & 0 deletions test/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 32204f3

Please sign in to comment.