1
0
mirror of https://framagit.org/tykayn/date-poll-api synced 2023-08-25 08:23:11 +02:00
This commit is contained in:
Tykayn 2022-02-10 10:41:31 +01:00 committed by tykayn
parent 110ef9fc7a
commit e488b76a2d

View File

@ -17,15 +17,16 @@ use Symfony\Component\Routing\Annotation\Route;
class PollController extends AbstractController {
/**
* @Post(
* path = "/essai",
* name = "essai"
* @Route(
* "/essai",
* name = "essai",
* methods={"GET"}
* )
* @param Request $request
* essai poll
* @return JsonResponse
*/
public function essaiAction(Request $request)
public function essai(Request $request): JsonResponse
{
$data = $request->getContent();
$data = json_decode($data, true);
@ -76,7 +77,7 @@ class PollController extends AbstractController {
/**
* on cherche un sondage par son url personnalisée
* @Route("/{id}", name="poll_show", methods={"GET"})
* @Route("/id/{id}", name="poll_show", methods={"GET"})
*/
public function show( $id ): Response {
$repository = $this->getDoctrine()->getRepository( Poll::class );