summaryrefslogtreecommitdiff
path: root/jsonrpc.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-21 21:41:26 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-21 21:41:26 -0500
commit8f0e544cd91b24423951bbb5d3f3be0950a63abe (patch)
tree456291eb5d7bdb846329b8b4fe55cdb5490a442c /jsonrpc.php
parent2a850757ee5f9c1a2119c562cf6caba3eda7ceba (diff)
Create TaskStatus model
Diffstat (limited to 'jsonrpc.php')
-rw-r--r--jsonrpc.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/jsonrpc.php b/jsonrpc.php
index d1ef7e6e..62537ff6 100644
--- a/jsonrpc.php
+++ b/jsonrpc.php
@@ -7,6 +7,7 @@ use Model\Project;
use Model\ProjectPermission;
use Model\Task;
use Model\TaskFinder;
+use Model\TaskStatus;
use Model\TaskValidator;
use Model\User;
use Model\Config;
@@ -26,6 +27,7 @@ $project = new Project($container);
$projectPermission = new ProjectPermission($container);
$task = new Task($container);
$taskFinder = new TaskFinder($container);
+$taskStatus = new TaskStatus($container);
$taskValidator = new TaskValidator($container);
$user = new User($container);
$category = new Category($container);
@@ -214,12 +216,12 @@ $server->register('updateTask', function($id, $title = null, $project_id = null,
return $valid && $task->update($values);
});
-$server->register('openTask', function($task_id) use ($task) {
- return $task->open($task_id);
+$server->register('openTask', function($task_id) use ($taskStatus) {
+ return $taskStatus->open($task_id);
});
-$server->register('closeTask', function($task_id) use ($task) {
- return $task->close($task_id);
+$server->register('closeTask', function($task_id) use ($taskStatus) {
+ return $taskStatus->close($task_id);
});
$server->register('removeTask', function($task_id) use ($task) {