up slug path
This commit is contained in:
parent
2836ccb137
commit
ed59c30961
|
@ -320,13 +320,13 @@ class PollController extends FramadateController {
|
||||||
/**
|
/**
|
||||||
* Check is a slug is already taken by a poll
|
* Check is a slug is already taken by a poll
|
||||||
* @Get(
|
* @Get(
|
||||||
* path = "/poll/slug/{slug}",
|
* path = "/slug/{slug}",
|
||||||
* name = "check_slug_is_unique",
|
* name = "check_slug_is_unique",
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function checkSlugIsUniqueAction( string $slug ) {
|
public function checkSlugIsUniqueAction( string $slug ) {
|
||||||
$emPoll = $this->getDoctrine()->getRepository( Poll::class );
|
$emPoll = $this->getDoctrine()->getRepository( Poll::class );
|
||||||
$found = $emPoll->findOneBySlug( $slug );
|
$found = $emPoll->findOneByCustomUrl( $slug );
|
||||||
if ( $found ) {
|
if ( $found ) {
|
||||||
// we should not find an other poll
|
// we should not find an other poll
|
||||||
return $this->json( [
|
return $this->json( [
|
||||||
|
|
Loading…
Reference in New Issue