Skip to content

Commit

Permalink
[#8] Add the check for a feed type
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisros committed Jan 6, 2018
1 parent d108d5a commit d29e05a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Controller/FeedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@ public function testAction(Request $request){

$config = FeedBuilderService::getConfigOfProfile($request->get('slug'));

if($config->get('type') != FeedBuilderService::TYPE_FEED){
throw new NotFoundHttpException('Feed not found.');
}

$feedbuilder = new FeedBuilderService($this->get('event_dispatcher'));
$result = $feedbuilder->run($config);

//@TODO Add check for ipaddress
//@TODO Add check for type feed
switch($request->get('_format')){
case 'xml':
return $this->XMLResponse($result, $config);
Expand Down

0 comments on commit d29e05a

Please sign in to comment.