mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
firmware: rework previous, status action on POST is sync
This commit is contained in:
parent
9541c1f963
commit
63af98ed5b
@ -65,14 +65,14 @@ class FirmwareController extends ApiControllerBase
|
||||
* Run check for updates
|
||||
* @return array
|
||||
*/
|
||||
public function checkAction($sync)
|
||||
public function checkAction()
|
||||
{
|
||||
$this->sessionClose(); // long running action, close session
|
||||
$response = [];
|
||||
|
||||
if ($this->request->isPost()) {
|
||||
$backend = new Backend();
|
||||
$response['msg_uuid'] = trim($backend->configdRun('firmware check', empty($sync) ? true : false));
|
||||
$response['msg_uuid'] = trim($backend->configdRun('firmware check', true));
|
||||
$response['status'] = 'ok';
|
||||
} else {
|
||||
$response['status'] = 'failure';
|
||||
@ -94,6 +94,12 @@ class FirmwareController extends ApiControllerBase
|
||||
$backend = new Backend();
|
||||
$target = null;
|
||||
|
||||
$this->sessionClose(); // long running action, close session
|
||||
|
||||
if ($this->request->isPost()) {
|
||||
$backend->configdRun('firmware check');
|
||||
}
|
||||
|
||||
$response = json_decode(trim($backend->configdRun('firmware product')), true);
|
||||
if ($response != null && $response['product_check'] != null) {
|
||||
$response = $response['product_check'];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user