Closes #137 - fast component status updates.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
class DashAPIController extends Controller
|
||||
{
|
||||
/**
|
||||
* Updates a component with the entered info.
|
||||
* @param Component $component
|
||||
* @return array
|
||||
*/
|
||||
public function postUpdateComponent(Component $component)
|
||||
{
|
||||
$componentData = Input::all();
|
||||
unset($componentData['_token']);
|
||||
if ($component->update($componentData))
|
||||
{
|
||||
return $component;
|
||||
}
|
||||
else
|
||||
{
|
||||
App::abort(500);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user