diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-09-17 14:47:41 +0200 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-09-17 14:47:41 +0200 |
commit | 243e72474bd0c87b8647efe1edeb1116a0a5fcd0 (patch) | |
tree | 11630e7879c012f64c8b457e37110ada67c10e83 /jsonrpc.php | |
parent | e7a20b9d8f8d7c47173c59782c5bd24a0ba6cac9 (diff) |
Improve board API calls
Diffstat (limited to 'jsonrpc.php')
-rw-r--r-- | jsonrpc.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/jsonrpc.php b/jsonrpc.php index 1a411718..72c9c297 100644 --- a/jsonrpc.php +++ b/jsonrpc.php @@ -114,6 +114,10 @@ $server->register('getColumns', function($project_id) use ($board) { return $board->getColumns($project_id); }); +$server->register('getColumn', function($column_id) use ($board) { + return $board->getColumn($column_id); +}); + $server->register('moveColumnUp', function($project_id, $column_id) use ($board) { return $board->moveUp($project_id, $column_id); }); @@ -122,13 +126,12 @@ $server->register('moveColumnDown', function($project_id, $column_id) use ($boar return $board->moveDown($project_id, $column_id); }); -$server->register('updateColumn', function($column_id, array $values) use ($board) { - return $board->updateColumn($column_id, $values); +$server->register('updateColumn', function($column_id, $title, $task_limit = 0) use ($board) { + return $board->updateColumn($column_id, $title, $task_limit); }); -$server->register('addColumn', function($project_id, array $values) use ($board) { - $values += array('project_id' => $project_id); - return $board->add($values); +$server->register('addColumn', function($project_id, $title, $task_limit = 0) use ($board) { + return $board->addColumn($project_id, $title, $task_limit); }); $server->register('removeColumn', function($column_id) use ($board) { |