summaryrefslogtreecommitdiff
path: root/app/Api
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-06-26 12:34:20 -0400
committerFrederic Guillot <fred@kanboard.net>2016-06-26 12:34:20 -0400
commitc110dffefe259c13e60193fb81ebb9d4b79504de (patch)
treebdeda4701f4f85b6a20615515b54192d66faf501 /app/Api
parentb48c0cecbb1f687641594430260a67938d870cbb (diff)
Added new API call: "getProjectByIdentifier"
Diffstat (limited to 'app/Api')
-rw-r--r--app/Api/Procedure/ProjectProcedure.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/Api/Procedure/ProjectProcedure.php b/app/Api/Procedure/ProjectProcedure.php
index fe6b63e2..a580c8d9 100644
--- a/app/Api/Procedure/ProjectProcedure.php
+++ b/app/Api/Procedure/ProjectProcedure.php
@@ -25,6 +25,13 @@ class ProjectProcedure extends BaseProcedure
return $this->formatProject($project);
}
+ public function getProjectByIdentifier($identifier)
+ {
+ $project = $this->formatProject($this->projectModel->getByIdentifier($identifier));
+ ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getProjectByIdentifier', $project['id']);
+ return $this->formatProject($project);
+ }
+
public function getAllProjects()
{
return $this->formatProjects($this->projectModel->getAll());