Fix missing api success indicator
This commit is contained in:
parent
407e3684b4
commit
9d477c6019
1 changed files with 4 additions and 1 deletions
|
@ -32,11 +32,14 @@ class API
|
||||||
if (file_exists($this->module_path)) {
|
if (file_exists($this->module_path)) {
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
$response = array();
|
$response = array(
|
||||||
|
'success' => false,
|
||||||
|
);
|
||||||
|
|
||||||
require $this->module_path;
|
require $this->module_path;
|
||||||
|
|
||||||
$response['warning'] = ob_get_clean();
|
$response['warning'] = ob_get_clean();
|
||||||
|
$response['success'] = true;
|
||||||
|
|
||||||
header('Content-type: application/json; charset=utf-8');
|
header('Content-type: application/json; charset=utf-8');
|
||||||
echo json_encode($response);
|
echo json_encode($response);
|
||||||
|
|
Loading…
Reference in a new issue