Error handling in undelete function and created the update function in BoardApiController

Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
This commit is contained in:
Ryan Fletcher
2018-07-12 18:08:53 -04:00
committed by Julius Härtl
parent d82746be97
commit 6822d7d099
2 changed files with 3 additions and 1 deletions

View File

@@ -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'],

View File

@@ -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) {