json( $this->getUser()->getCurrentLocation(), JsonResponse::HTTP_OK, [], ['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']] ); } }