diff options
Diffstat (limited to 'jsonrpc.php')
-rw-r--r-- | jsonrpc.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/jsonrpc.php b/jsonrpc.php index 981fefa2..186e454d 100644 --- a/jsonrpc.php +++ b/jsonrpc.php @@ -10,7 +10,7 @@ use Model\User; use Model\Config; use Model\Category; use Model\Comment; -use Model\Subtask; +use Model\SubTask; use Model\Board; use Model\Action; @@ -20,7 +20,7 @@ $task = new Task($registry->shared('db'), $registry->shared('event')); $user = new User($registry->shared('db'), $registry->shared('event')); $category = new Category($registry->shared('db'), $registry->shared('event')); $comment = new Comment($registry->shared('db'), $registry->shared('event')); -$subtask = new Subtask($registry->shared('db'), $registry->shared('event')); +$subtask = new SubTask($registry->shared('db'), $registry->shared('event')); $board = new Board($registry->shared('db'), $registry->shared('event')); $action = new Action($registry->shared('db'), $registry->shared('event')); @@ -123,6 +123,14 @@ $server->register('updateTask', function($values) use ($task) { return $valid && $task->update($values); }); +$server->register('openTask', function($task_id) use ($task) { + return $task->open($task_id); +}); + +$server->register('closeTask', function($task_id) use ($task) { + return $task->close($task_id); +}); + $server->register('removeTask', function($task_id) use ($task) { return $task->remove($task_id); }); |