From e1dd7f70c5cc0a0086d83d5fcdaa7a25081a5e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 10 Feb 2015 23:13:34 +0100 Subject: first test for API, need refactor --- src/Wallabag/CoreBundle/Controller/WallabagRestController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Controller/WallabagRestController.php') diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php index 27d11da5..fcd212ef 100644 --- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php @@ -33,7 +33,7 @@ class WallabagRestController extends Controller throw $this->createNotFoundException(); } - return $user->getSalt(); + return array($user->getSalt()); } /** * Retrieve all entries. It could be filtered by many options. -- cgit v1.2.3 From 874e3e10a45a5b3c662bac1112bbdc1acb0adb95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 11 Feb 2015 11:52:10 +0100 Subject: phpdoc --- src/Wallabag/CoreBundle/Controller/WallabagRestController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Controller/WallabagRestController.php') diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php index fcd212ef..3cfb8a77 100644 --- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php @@ -20,7 +20,7 @@ class WallabagRestController extends Controller * {"name"="username", "dataType"="string", "required"=true, "description"="username"} * } * ) - * @return string + * @return array */ public function getSaltAction($username) { -- cgit v1.2.3 From f170f315941b461a2bcd85843583baedbc48efd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 11 Feb 2015 15:15:06 +0100 Subject: add test for empty salt --- src/Wallabag/CoreBundle/Controller/WallabagRestController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Controller/WallabagRestController.php') diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php index 3cfb8a77..e9cd8c93 100644 --- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php @@ -33,7 +33,7 @@ class WallabagRestController extends Controller throw $this->createNotFoundException(); } - return array($user->getSalt()); + return array($user->getSalt() ?: null); } /** * Retrieve all entries. It could be filtered by many options. -- cgit v1.2.3