mirror of
https://framagit.org/tykayn/date-poll-api
synced 2023-08-25 08:23:11 +02:00
aab2d74b19
rearrange controllers for api and no api
This reverts commit 8fbd5462
35 lines
774 B
PHP
Executable File
35 lines
774 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Entity\Owner;
|
|
use App\Entity\Poll;
|
|
use App\Repository\PollRepository;
|
|
use App\Service\MailService;
|
|
use FOS\RestBundle\Controller\Annotations\Get;
|
|
use FOS\RestBundle\Controller\Annotations\Route;
|
|
use JMS\Serializer\Type\Exception\Exception;
|
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
|
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
|
|
|
|
/**
|
|
* Class DefaultController
|
|
* @package App\Controller
|
|
* @Route("/",name="home_")
|
|
*/
|
|
class DefaultController extends EmailsController {
|
|
|
|
/**
|
|
* @Get(path ="/",
|
|
* name = "sweet_home")
|
|
*/
|
|
public function indexAction() {
|
|
|
|
$polls = $this->getDoctrine()->getRepository( Poll::class )->findAll();
|
|
|
|
return $this->render( 'pages/home.html.twig', [] );
|
|
}
|
|
|
|
|
|
}
|