From 8f0e544cd91b24423951bbb5d3f3be0950a63abe Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Fri, 21 Nov 2014 21:41:26 -0500 Subject: Create TaskStatus model --- jsonrpc.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'jsonrpc.php') 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) { -- cgit v1.2.3