diff options
Diffstat (limited to 'app/Controller/GroupHelper.php')
-rw-r--r-- | app/Controller/GroupHelper.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/Controller/GroupHelper.php b/app/Controller/GroupHelper.php index 34f522a6..429614c2 100644 --- a/app/Controller/GroupHelper.php +++ b/app/Controller/GroupHelper.php @@ -2,6 +2,8 @@ namespace Kanboard\Controller; +use Kanboard\Formatter\GroupAutoCompleteFormatter; + /** * Group Helper * @@ -11,14 +13,14 @@ namespace Kanboard\Controller; class GroupHelper extends Base { /** - * Group autocompletion (Ajax) + * Group auto-completion (Ajax) * * @access public */ public function autocomplete() { $search = $this->request->getStringParam('term'); - $groups = $this->groupManager->find($search); - $this->response->json($this->groupAutoCompleteFormatter->setGroups($groups)->format()); + $formatter = new GroupAutoCompleteFormatter($this->groupManager->find($search)); + $this->response->json($formatter->format()); } } |