mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 21:49:01 +01:00
Merge pull request #1751 from CachetHQ/fix-component-group-api
Fix component group api
This commit is contained in:
commit
9ddf9e3e1a
@ -20,6 +20,13 @@ use Illuminate\Database\QueryException;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
|
||||
/**
|
||||
* This is the component group controller.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
* @author Graham Campbell <graham@alt-three.com>
|
||||
* @author Joe Cohen <joe@alt-three.com>
|
||||
*/
|
||||
class ComponentGroupController extends AbstractApiController
|
||||
{
|
||||
/**
|
||||
@ -67,7 +74,7 @@ class ComponentGroupController extends AbstractApiController
|
||||
$group = dispatch(new AddComponentGroupCommand(
|
||||
Binput::get('name'),
|
||||
Binput::get('order', 0),
|
||||
Binput::get('collapsed')
|
||||
Binput::get('collapsed', 0)
|
||||
));
|
||||
} catch (QueryException $e) {
|
||||
throw new BadRequestHttpException();
|
||||
@ -89,7 +96,7 @@ class ComponentGroupController extends AbstractApiController
|
||||
$group = dispatch(new UpdateComponentGroupCommand(
|
||||
$group,
|
||||
Binput::get('name'),
|
||||
Binput::get('order', 0),
|
||||
Binput::get('order'),
|
||||
Binput::get('collapsed')
|
||||
));
|
||||
} catch (QueryException $e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user