Skip to content

Commit

Permalink
Lanvard#48 add decorators for routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Reindert Vetter committed May 24, 2020
1 parent 32204f3 commit 30165f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/providers/route_service_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ func (p RouteServiceProvider) Boot(app inter.App) inter.App {
collection.Merge(routes.Api)
collection.Merge(routes.Web)

// collection.WhereMulti(map[string]string{
// "id": "[0-9]+",
// })

routing.DecorateRoutes(collection)

app.Singleton("routes", collection)

return app
Expand Down
2 changes: 1 addition & 1 deletion test/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func ResponseByRequest(request inter.Request) inter.Response {

app := request.App()
if nil == request.App() {
if request.App() == nil {
app = bootstrap.NewAppFromBoot()
}

Expand Down

0 comments on commit 30165f4

Please sign in to comment.