<?php
namespace Hona\ApiBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Request;
class MeController extends Controller
{
/**
* @Route("/me", name="me_get", methods={"GET"})
* @param $request
*/
public function meGETAction(Request $request)
{
$user = $this->getUser();
return $this->forward('HonaApiBundle:User:userGET', [
'request' => $request,
'uuid' => $user->getUuid(),
]);
}
/**
* @Route("/me", name="me_put", methods={"PUT"})
* @param $request
*/
public function mePUTAction(Request $request)
{
$user = $this->getUser();
return $this->forward('HonaApiBundle:User:userPUT', [
'request' => $request,
'uuid' => $user->getUuid(),
]);
}
/**
* @Route("/me", name="me_delete", methods={"DELETE"})
* @param $request
*/
public function meDELETEAction(Request $request)
{
$user = $this->getUser();
return $this->forward('HonaApiBundle:User:userDELETE', [
'request' => $request,
'uuid' => $user->getUuid(),
]);
}
}