Use BoardFormatter to generate the board

This commit is contained in:
Frederic Guillot
2016-06-24 08:50:57 -04:00
parent d560f84b37
commit 9e278a9370
16 changed files with 667 additions and 217 deletions

View File

@@ -2,6 +2,8 @@
namespace Kanboard\Api;
use Kanboard\Formatter\BoardFormatter;
/**
* Board API controller
*
@@ -13,6 +15,10 @@ class BoardApi extends BaseApi
public function getBoard($project_id)
{
$this->checkProjectPermission($project_id);
return $this->boardModel->getBoard($project_id);
return BoardFormatter::getInstance($this->container)
->withProjectId($project_id)
->withQuery($this->taskFinderModel->getExtendedQuery())
->format();
}
}