From 0ba9617a23ad2dd2c02437de4d255995661f35ed Mon Sep 17 00:00:00 2001 From: Tykayn Date: Fri, 5 Feb 2021 15:33:38 +0100 Subject: [PATCH] link to base config --- src/Controller/api/PollController.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Controller/api/PollController.php b/src/Controller/api/PollController.php index 71c4a16..af0c9ab 100644 --- a/src/Controller/api/PollController.php +++ b/src/Controller/api/PollController.php @@ -6,11 +6,6 @@ use App\Controller\FramadateController; use App\Entity\Choice; use App\Entity\Owner; use App\Entity\Poll; -use FOS\RestBundle\Controller\Annotations\Delete; -use FOS\RestBundle\Controller\Annotations\Get; -use FOS\RestBundle\Controller\Annotations\Post; -use FOS\RestBundle\Controller\Annotations\Put; -use FOS\RestBundle\Controller\Annotations\Route; use JMS\Serializer\Exception\RuntimeException; use JMS\Serializer\SerializerBuilder; use JMS\Serializer\SerializerInterface; @@ -18,6 +13,13 @@ use Swift_Mailer; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; + +use FOS\RestBundle\Controller\Annotations\Get; +use FOS\RestBundle\Controller\Annotations\Put; +use FOS\RestBundle\Controller\Annotations\Delete; +use FOS\RestBundle\Controller\Annotations\Post; +use FOS\RestBundle\Controller\Annotations\Route; /** * Class DefaultController @@ -315,7 +317,7 @@ class PollController extends FramadateController { } /** - * Check is a slug is already taken by a poll + * Checks if a slug is already taken by a poll * @Get( * path = "/slug/{slug}", * name = "check_slug_is_unique", @@ -349,7 +351,7 @@ class PollController extends FramadateController { return $this->json( [ 'message' => ' yes this slug is available on this Framadate instance ', 'data' => [ - 'slug' => $slug, + 'slug' => $customUrl, ], ], 404 );