diff options
Diffstat (limited to 'src/Wallabag')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/WallabagRestController.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php index a382caf7..81974371 100644 --- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php | |||
@@ -40,19 +40,15 @@ class WallabagRestController extends Controller | |||
40 | /** | 40 | /** |
41 | * Retrieve salt for a giver user. | 41 | * Retrieve salt for a giver user. |
42 | * | 42 | * |
43 | * @ApiDoc( | 43 | * @ApiDoc() |
44 | * parameters={ | ||
45 | * {"name"="username", "dataType"="string", "required"=true, "description"="username"} | ||
46 | * } | ||
47 | * ) | ||
48 | * @return array | 44 | * @return array |
49 | */ | 45 | */ |
50 | public function getSaltAction(Request $request) | 46 | public function getSaltAction($username) |
51 | { | 47 | { |
52 | $user = $this | 48 | $user = $this |
53 | ->getDoctrine() | 49 | ->getDoctrine() |
54 | ->getRepository('WallabagCoreBundle:User') | 50 | ->getRepository('WallabagCoreBundle:User') |
55 | ->findOneByUsername($request->query->get('username')); | 51 | ->findOneByUsername($username); |
56 | 52 | ||
57 | if (is_null($user)) { | 53 | if (is_null($user)) { |
58 | throw $this->createNotFoundException(); | 54 | throw $this->createNotFoundException(); |