remove JsonResponse

This commit is contained in:
Nicolas Lœuillet 2015-02-27 17:51:36 +01:00
parent b0cce9e636
commit db2b4bf678

View file

@ -5,7 +5,6 @@ namespace Wallabag\CoreBundle\Controller;
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\Tag;
@ -94,7 +93,7 @@ class WallabagRestController extends Controller
$json = $this->get('serializer')->serialize($entries, 'json');
return new JsonResponse($json, 200);
return new Response($json, 200, array('application/json'));
}
/**
@ -115,7 +114,7 @@ class WallabagRestController extends Controller
$json = $this->get('serializer')->serialize($entry, 'json');
return new JsonResponse($json, 200);
return new Response($json, 200, array('application/json'));
}
/**
@ -151,7 +150,7 @@ class WallabagRestController extends Controller
$json = $this->get('serializer')->serialize($entry, 'json');
return new JsonResponse($json, 200);
return new Response($json, 200, array('application/json'));
}
/**
@ -202,7 +201,7 @@ class WallabagRestController extends Controller
$json = $this->get('serializer')->serialize($entry, 'json');
return new JsonResponse($json, 200);
return new Response($json, 200, array('application/json'));
}
/**
@ -227,7 +226,7 @@ class WallabagRestController extends Controller
$json = $this->get('serializer')->serialize($entry, 'json');
return new JsonResponse($json, 200);
return new Response($json, 200, array('application/json'));
}
/**
@ -279,7 +278,7 @@ class WallabagRestController extends Controller
$json = $this->get('serializer')->serialize($entry, 'json');
return new JsonResponse($json, 200);
return new Response($json, 200, array('application/json'));
}
/**
@ -305,7 +304,7 @@ class WallabagRestController extends Controller
$json = $this->get('serializer')->serialize($entry, 'json');
return new JsonResponse($json, 200);
return new Response($json, 200, array('application/json'));
}
/**
@ -317,7 +316,7 @@ class WallabagRestController extends Controller
{
$json = $this->get('serializer')->serialize($this->getUser()->getTags(), 'json');
return new JsonResponse($json, 200);
return new Response($json, 200, array('application/json'));
}
/**
@ -341,6 +340,6 @@ class WallabagRestController extends Controller
$json = $this->get('serializer')->serialize($tag, 'json');
return new JsonResponse($json, 200);
return new Response($json, 200, array('application/json'));
}
}