committing WIP (improving error validation across the api's)
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
This commit is contained in:
committed by
Julius Härtl
parent
a388d199dc
commit
2668f6b80c
@@ -66,7 +66,7 @@ class StackApiController extends ApiController {
|
||||
* Return all of the stacks in the specified board.
|
||||
*/
|
||||
public function index() {
|
||||
$boardError = $this->apiHelper->entityHasError( $this->request->params['boardId'], 'board', $this->boardService );
|
||||
$boardError = $this->apiHelper->boardHasError( $this->request->params['boardId'], $this->boardService );
|
||||
|
||||
if ($boardError) {
|
||||
return new DataResponse($boardError['message'], $boardError['status']);
|
||||
@@ -95,7 +95,7 @@ class StackApiController extends ApiController {
|
||||
*/
|
||||
public function create($title, $order) {
|
||||
|
||||
$boardError = $this->apiHelper->entityHasError( $this->request->params['boardId'], 'board', $this->boardService );
|
||||
$boardError = $this->apiHelper->boardHasError( $this->request->params['boardId'], $this->boardService );
|
||||
|
||||
if ($boardError) {
|
||||
return new DataResponse($boardError['message'], $boardError['status']);
|
||||
@@ -127,7 +127,7 @@ class StackApiController extends ApiController {
|
||||
*/
|
||||
public function update($title, $order) {
|
||||
|
||||
$boardError = $this->apiHelper->entityHasError( $this->request->params['boardId'], 'board', $this->boardService );
|
||||
$boardError = $this->apiHelper->boardHasError( $this->request->params['boardId'], $this->boardService );
|
||||
|
||||
if ($boardError) {
|
||||
return new DataResponse($boardError['message'], $boardError['status']);
|
||||
@@ -163,7 +163,7 @@ class StackApiController extends ApiController {
|
||||
*/
|
||||
public function delete() {
|
||||
|
||||
$boardError = $this->apiHelper->entityHasError( $this->request->params['boardId'], 'board', $this->boardService );
|
||||
$boardError = $this->apiHelper->boardHasError( $this->request->params['boardId'], $this->boardService );
|
||||
|
||||
if ($boardError) {
|
||||
return new DataResponse($boardError['message'], $boardError['status']);
|
||||
|
||||
Reference in New Issue
Block a user