summaryrefslogtreecommitdiff
path: root/app/Api/Procedure/BoardProcedure.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Api/Procedure/BoardProcedure.php')
-rw-r--r--app/Api/Procedure/BoardProcedure.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/Api/Procedure/BoardProcedure.php b/app/Api/Procedure/BoardProcedure.php
new file mode 100644
index 00000000..674b5466
--- /dev/null
+++ b/app/Api/Procedure/BoardProcedure.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Kanboard\Api\Procedure;
+
+use Kanboard\Api\Authorization\ProjectAuthorization;
+use Kanboard\Formatter\BoardFormatter;
+
+/**
+ * Board API controller
+ *
+ * @package Kanboard\Api\Procedure
+ * @author Frederic Guillot
+ */
+class BoardProcedure extends BaseProcedure
+{
+ public function getBoard($project_id)
+ {
+ ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getBoard', $project_id);
+
+ return BoardFormatter::getInstance($this->container)
+ ->withProjectId($project_id)
+ ->withQuery($this->taskFinderModel->getExtendedQuery())
+ ->format();
+ }
+}