commit bug with getSalt

This commit is contained in:
Nicolas Lœuillet 2015-02-26 15:00:28 +01:00
parent 0ca374e6a1
commit 6ee416a069

View file

@ -40,19 +40,15 @@ class WallabagRestController extends Controller
/** /**
* Retrieve salt for a giver user. * Retrieve salt for a giver user.
* *
* @ApiDoc( * @ApiDoc()
* parameters={
* {"name"="username", "dataType"="string", "required"=true, "description"="username"}
* }
* )
* @return array * @return array
*/ */
public function getSaltAction(Request $request) public function getSaltAction($username)
{ {
$user = $this $user = $this
->getDoctrine() ->getDoctrine()
->getRepository('WallabagCoreBundle:User') ->getRepository('WallabagCoreBundle:User')
->findOneByUsername($request->query->get('username')); ->findOneByUsername($username);
if (is_null($user)) { if (is_null($user)) {
throw $this->createNotFoundException(); throw $this->createNotFoundException();