/** @Route("/user/{userId}") */
public function getUserById($userId)
{
$user = $this->getDoctrine()->getRepository(User::class)->find($userId);
// $tokens = $user->getTokens();
$tokens = [];
return $this->json([
'user' => $user->export(),
'tokens' => $tokens,
]);
}
/** @Route("/user/{userId}") */
public function getUserById($userId)
{
$user = $this->getDoctrine()->getRepository(User::class)->find($userId);
$tokens = $user->getTokens();
// $tokens = [];
return $this->json([
'user' => $user->export(),
'tokens' => $tokens,
]);
}