1
0
mirror of https://framagit.org/tykayn/date-poll-api synced 2023-08-25 08:23:11 +02:00

Compare commits

..

No commits in common. "0ba9617a23ad2dd2c02437de4d255995661f35ed" and "5ce36dabcdcc8d4863a4a1e56d3444c48955fb1d" have entirely different histories.

2 changed files with 7 additions and 12 deletions

3
.gitignore vendored
View File

@ -6,9 +6,6 @@
/public/bundles/ /public/bundles/
/var/ /var/
/vendor/ /vendor/
node_modules
public/build
###< symfony/framework-bundle ### ###< symfony/framework-bundle ###
### IDE ### IDE

View File

@ -6,6 +6,11 @@ use App\Controller\FramadateController;
use App\Entity\Choice; use App\Entity\Choice;
use App\Entity\Owner; use App\Entity\Owner;
use App\Entity\Poll; 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\Exception\RuntimeException;
use JMS\Serializer\SerializerBuilder; use JMS\Serializer\SerializerBuilder;
use JMS\Serializer\SerializerInterface; use JMS\Serializer\SerializerInterface;
@ -13,13 +18,6 @@ use Swift_Mailer;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; 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 * Class DefaultController
@ -317,7 +315,7 @@ class PollController extends FramadateController {
} }
/** /**
* Checks if a slug is already taken by a poll * Check is a slug is already taken by a poll
* @Get( * @Get(
* path = "/slug/{slug}", * path = "/slug/{slug}",
* name = "check_slug_is_unique", * name = "check_slug_is_unique",
@ -351,7 +349,7 @@ class PollController extends FramadateController {
return $this->json( [ return $this->json( [
'message' => ' yes this slug is available on this Framadate instance ', 'message' => ' yes this slug is available on this Framadate instance ',
'data' => [ 'data' => [
'slug' => $customUrl, 'slug' => $slug,
], ],
], ],
404 ); 404 );