From de128dbad860478496a0d655b5eb5c1005ebbabe Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 18 Feb 2017 09:42:01 -0500 Subject: Remove default swimlane --- app/Api/Procedure/SwimlaneProcedure.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'app/Api/Procedure/SwimlaneProcedure.php') diff --git a/app/Api/Procedure/SwimlaneProcedure.php b/app/Api/Procedure/SwimlaneProcedure.php index 9b7d181d..25b1efb0 100644 --- a/app/Api/Procedure/SwimlaneProcedure.php +++ b/app/Api/Procedure/SwimlaneProcedure.php @@ -3,6 +3,7 @@ namespace Kanboard\Api\Procedure; use Kanboard\Api\Authorization\ProjectAuthorization; +use Kanboard\Model\SwimlaneModel; /** * Swimlane API controller @@ -15,7 +16,7 @@ class SwimlaneProcedure extends BaseProcedure public function getActiveSwimlanes($project_id) { ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getActiveSwimlanes', $project_id); - return $this->swimlaneModel->getSwimlanes($project_id); + return $this->swimlaneModel->getAllByStatus($project_id, SwimlaneModel::ACTIVE); } public function getAllSwimlanes($project_id) @@ -42,16 +43,10 @@ class SwimlaneProcedure extends BaseProcedure return $this->swimlaneModel->getById($swimlane_id); } - public function getDefaultSwimlane($project_id) - { - ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getDefaultSwimlane', $project_id); - return $this->swimlaneModel->getDefault($project_id); - } - public function addSwimlane($project_id, $name, $description = '') { ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'addSwimlane', $project_id); - return $this->swimlaneModel->create(array('project_id' => $project_id, 'name' => $name, 'description' => $description)); + return $this->swimlaneModel->create($project_id, $name, $description); } public function updateSwimlane($swimlane_id, $name, $description = null) -- cgit v1.2.3