Skip to content

Commit

Permalink
Compatibility with Symfony 3. Fix routes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nilov committed Mar 27, 2017
1 parent d5922e3 commit f99d94e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Controller/ContentBlockController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@

/**
* Class ContentBlockController
*
*
* @package GlavwebContentBlockBundle\Controller
*/
class ContentBlockController extends Controller
{
/**
* @Route("/content-block/save", name="content_block_save", requirements={"_method": "POST"})
* @Route("/content-block/save", name="content_block_save", methods={"POST"})
*
* @param Request $request
* @return JsonResponse
Expand Down Expand Up @@ -59,7 +59,7 @@ public function actionSave(Request $request)
}

/**
* @Route("/api/content-block/{name}", name="content_block_create", requirements={"_method": "POST"})
* @Route("/api/content-block/{name}", name="content_block_create", methods={"POST"})
*
* @param string $name
* @return JsonResponse
Expand Down Expand Up @@ -92,7 +92,7 @@ public function createAction($name)
}

/**
* @Route("/api/content-block/{name}", name="content_block_show", requirements={"_method": "GET"})
* @Route("/api/content-block/{name}", name="content_block_show", methods={"GET"})
*
* @param string $name
* @return JsonResponse
Expand Down Expand Up @@ -124,7 +124,7 @@ public function showAction($name)
}

/**
* @Route("/api/content-block/{name}", name="content_block_edit", requirements={"_method": "PUT"})
* @Route("/api/content-block/{name}", name="content_block_edit", methods={"PUT"})
*
* @param string $name
* @param Request $request
Expand Down Expand Up @@ -155,7 +155,7 @@ public function editAction($name, Request $request)
}

/**
* @Route("/api/content-block/{name}", name="content_block_remove", requirements={"_method": "DELETE"})
* @Route("/api/content-block/{name}", name="content_block_remove", methods={"DELETE"})
*
* @param string $name
* @return JsonResponse
Expand Down

0 comments on commit f99d94e

Please sign in to comment.