mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
php cs fixer
This commit is contained in:
parent
8493a64794
commit
4b432c64b0
@ -17,27 +17,6 @@ use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class UserApiController extends ApiController
|
||||
{
|
||||
/**
|
||||
* @Route(
|
||||
* "/api/1.0/main/whoami.{_format}",
|
||||
* name="chill_main_user_whoami",
|
||||
* requirements={
|
||||
* "_format": "json"
|
||||
* }
|
||||
* )
|
||||
*
|
||||
* @param mixed $_format
|
||||
*/
|
||||
public function whoami($_format): JsonResponse
|
||||
{
|
||||
return $this->json(
|
||||
$this->getUser(),
|
||||
JsonResponse::HTTP_OK,
|
||||
[],
|
||||
['groups' => ['read']]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route(
|
||||
* "/api/1.0/main/user-current-location.{_format}",
|
||||
@ -58,4 +37,25 @@ class UserApiController extends ApiController
|
||||
['groups' => ['read']]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route(
|
||||
* "/api/1.0/main/whoami.{_format}",
|
||||
* name="chill_main_user_whoami",
|
||||
* requirements={
|
||||
* "_format": "json"
|
||||
* }
|
||||
* )
|
||||
*
|
||||
* @param mixed $_format
|
||||
*/
|
||||
public function whoami($_format): JsonResponse
|
||||
{
|
||||
return $this->json(
|
||||
$this->getUser(),
|
||||
JsonResponse::HTTP_OK,
|
||||
[],
|
||||
['groups' => ['read']]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -55,14 +55,6 @@ final class UserApiControllerTest extends WebTestCase
|
||||
return $data['results'][0];
|
||||
}
|
||||
|
||||
public function testWhoami()
|
||||
{
|
||||
$client = $this->getClientAuthenticated();
|
||||
|
||||
$client->request(Request::METHOD_GET, '/api/1.0/main/whoami.json');
|
||||
|
||||
$this->assertResponseIsSuccessful();
|
||||
}
|
||||
public function testUserCurrentLocation()
|
||||
{
|
||||
$client = $this->getClientAuthenticated();
|
||||
@ -71,4 +63,13 @@ final class UserApiControllerTest extends WebTestCase
|
||||
|
||||
$this->assertResponseIsSuccessful();
|
||||
}
|
||||
|
||||
public function testWhoami()
|
||||
{
|
||||
$client = $this->getClientAuthenticated();
|
||||
|
||||
$client->request(Request::METHOD_GET, '/api/1.0/main/whoami.json');
|
||||
|
||||
$this->assertResponseIsSuccessful();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user