From 6822d7d099827414429eba95d85ed6825750e3db Mon Sep 17 00:00:00 2001 From: Ryan Fletcher Date: Thu, 12 Jul 2018 18:08:53 -0400 Subject: [PATCH] Error handling in undelete function and created the update function in BoardApiController Signed-off-by: Ryan Fletcher --- appinfo/routes.php | 1 + lib/Controller/BoardApiController.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index f7a6f0576..e6524ae51 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -81,6 +81,7 @@ return [ ['name' => 'board_api#get', 'url' => '/api/v1.0/boards/{id}', 'verb' => 'GET'], ['name' => 'board_api#create', 'url' => '/api/v1.0/boards', 'verb' => 'POST'], ['name' => 'board_api#delete', 'url' => '/api/v1.0/boards/{id}', 'verb' => 'DELETE'], + ['name' => 'board_api#update', 'url' => '/api/v1.0/boards/{id}', 'verb' => 'PUT'], ['name' => 'board_api#undo_delete', 'url' => '/api/v1.0/boards/{id}/undo_delete', 'verb' => 'POST'], ['name' => 'stack_api#index', 'url' => '/api/v1.0/board/{boardId}/stacks', 'verb' => 'GET'], diff --git a/lib/Controller/BoardApiController.php b/lib/Controller/BoardApiController.php index c90d1240d..1f0ede20e 100644 --- a/lib/Controller/BoardApiController.php +++ b/lib/Controller/BoardApiController.php @@ -114,7 +114,8 @@ class BoardApiController extends ApiController { * * Create a board with the specified title and color. */ - public function update($boardId, $title, $color, $archived) { + public function update($boardId, $title, $color, $archived) { + $board = $this->service->update($boardId, $title, $color, $archived); if ($board === false || $board === null) {