From ed59c30961326db7de9c0c38e00d5c1479d7875c Mon Sep 17 00:00:00 2001 From: Baptiste Lemoine Date: Tue, 21 Apr 2020 18:03:18 +0200 Subject: [PATCH] up slug path --- src/Controller/PollController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/PollController.php b/src/Controller/PollController.php index 6752cb6..d296287 100644 --- a/src/Controller/PollController.php +++ b/src/Controller/PollController.php @@ -320,13 +320,13 @@ class PollController extends FramadateController { /** * Check is a slug is already taken by a poll * @Get( - * path = "/poll/slug/{slug}", + * path = "/slug/{slug}", * name = "check_slug_is_unique", * ) */ public function checkSlugIsUniqueAction( string $slug ) { $emPoll = $this->getDoctrine()->getRepository( Poll::class ); - $found = $emPoll->findOneBySlug( $slug ); + $found = $emPoll->findOneByCustomUrl( $slug ); if ( $found ) { // we should not find an other poll return $this->json( [