Merge pull request #269 from Hywan/fix_example_api

Fix bad accesses and bad arguments
This commit is contained in:
Alex Bilbie 2014-12-10 15:13:10 +00:00
commit 164cc6ddb9

View File

@ -76,7 +76,7 @@ $router->get('/users', function (Request $request) use ($server) {
});
// GET /users/{username}
$router->get('/users/{username}', function (Request $request, $args) use ($server) {
$router->get('/users/{username}', function (Request $request, Response $response, array $args) use ($server) {
$result = (new Model\Users())->get($args['username']);