diff options
Diffstat (limited to 'js/controller')
-rw-r--r-- | js/controller/ShareController.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/js/controller/ShareController.js b/js/controller/ShareController.js index 852650c17..29a33141a 100644 --- a/js/controller/ShareController.js +++ b/js/controller/ShareController.js @@ -11,18 +11,17 @@ app.controller('ShareController', function (ShareResource, Loading) { this.userList = []; + /** + * Retrieve users matching search query using OC + */ this.searchUsers = function(search) { - Loading.setLoading('user', true); - - // TODO: search === undefined 🤢 je pense pas que c'est ouf comme syntaxe - if (search === '' || search === undefined) { + if (!search || search === '') { this.userList = []; Loading.setLoading('user', false); return; } - // TODO: bug - requetes retardataires (regarder issues git) var response = ShareResource.getUsers(search); response.then((response) => { this.userList = response.ocs.data.users; |