<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**
* Class SiteController
* @package App\Controller
*/
class SiteController extends AbstractController
{
/**
* @Route("/", name="homepage")
*/
public function index()
{
if ($this->isGranted('IS_AUTHENTICATED_REMEMBERED', $this->getUser())) {
return $this->redirectToRoute('dashboard');
}
return $this->redirectToRoute('app_sign_in');
}
/**
* @Route("/site/renewSession", name="renewSession")
*/
public function renewSession()
{
return $this->json(json_encode(Response::HTTP_OK));
}
}