Skip to content

Commit

Permalink
Fix for the issue #56
Browse files Browse the repository at this point in the history
  • Loading branch information
luccamendonca-printi committed Jul 2, 2017
1 parent 8cc32d1 commit ee57fcb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Controllers/ContentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,30 @@ public function connect(Application $app)
*/
$ctr = $app['controllers_factory'];

$ctr->get('/', 'root')
$ctr->get('/', [$this, 'root'])
->bind('jsonapi');

$ctr->get('/menu', 'menu')
$ctr->get('/menu', [$this, 'menu'])
->bind('jsonapi.menu');

$ctr->get('/taxonomy', 'taxonomy')
$ctr->get('/taxonomy', [$this, 'taxonomy'])
->bind('jsonapi.taxonomy');

$ctr->get('/search', 'searchAll')
$ctr->get('/search', [$this, 'searchAll'])
->bind('jsonapi.searchAll')
->convert('parameters', 'jsonapi.converter:grabParameters');

$ctr->get('/{contentType}/search', 'searchContent')
$ctr->get('/{contentType}/search', [$this, 'searchContent'])
->bind('jsonapi.searchContent')
->convert('parameters', 'jsonapi.converter:grabParameters');

$ctr->get('/{contentType}/{slug}/{relatedContentType}', 'singleContent')
$ctr->get('/{contentType}/{slug}/{relatedContentType}', [$this, 'singleContent'])
->value('relatedContentType', null)
->assert('slug', '[a-zA-Z0-9_\-]+')
->bind('jsonapi.singleContent')
->convert('parameters', 'jsonapi.converter:grabParameters');

$ctr->get('/{contentType}', 'listContent')
$ctr->get('/{contentType}', [$this, 'listContent'])
->bind('jsonapi.listContent')
->convert('parameters', 'jsonapi.converter:grabParameters');

Expand Down

0 comments on commit ee57fcb

Please sign in to comment.