|
@@ -4,7 +4,7 @@ namespace Base\OAuthBundle\Controller;
|
|
|
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
-use Symfony\Component\HttpFoundation\Response;
|
|
|
|
|
|
+use Symfony\Component\HttpFoundation\JsonResponse;
|
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
|
|
|
|
|
class OAuthController extends Controller
|
|
class OAuthController extends Controller
|
|
@@ -22,7 +22,7 @@ class OAuthController extends Controller
|
|
|
|
|
|
/**
|
|
/**
|
|
* @Route("/api/user/me", name="user_data_json")
|
|
* @Route("/api/user/me", name="user_data_json")
|
|
- * @return Response
|
|
|
|
|
|
+ * @return JsonResponse
|
|
*/
|
|
*/
|
|
public function getUserDataJsonAction()
|
|
public function getUserDataJsonAction()
|
|
{
|
|
{
|
|
@@ -36,7 +36,7 @@ class OAuthController extends Controller
|
|
$data['roles'] = $user->getRoles();
|
|
$data['roles'] = $user->getRoles();
|
|
}
|
|
}
|
|
|
|
|
|
- return new Response(json_encode($data));
|
|
|
|
|
|
+ return new JsonResponse($data);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|