Skip to content

Commit

Permalink
Simplify routing setup
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Aug 28, 2021
1 parent 01259f9 commit 4073d88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"require" : {
"xp-framework/core": "^10.0 | ^9.0 | ^8.0 | ^7.0",
"xp-forge/lambda": "^1.0",
"xp-forge/web": "^2.0",
"xp-forge/web": "^2.13",
"php": ">=7.0.0"
},
"require-dev" : {
Expand Down
5 changes: 2 additions & 3 deletions src/main/php/com/amazon/aws/lambda/HttpApi.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@ public function target() {
});

// Determine routing
$r= $this->routes(new Environment(
$routing= Routing::cast($this->routes(new Environment(
getenv('PROFILE') ?: 'prod',
$this->environment->root,
$this->environment->path('static'),
[$this->environment->properties],
[],
$logging
));
$routing= $r instanceof Application ? $r->routing() : Routing::cast($r);
)));

// Return event handler
return function($event, $context) use($routing, $logging) {
Expand Down

0 comments on commit 4073d88

Please sign in to comment.