Fix missing api success indicator

This commit is contained in:
grandeljay 2022-12-14 16:47:27 +01:00
parent 407e3684b4
commit 9d477c6019

View file

@ -32,11 +32,14 @@ class API
if (file_exists($this->module_path)) {
ob_start();
$response = array();
$response = array(
'success' => false,
);
require $this->module_path;
$response['warning'] = ob_get_clean();
$response['success'] = true;
header('Content-type: application/json; charset=utf-8');
echo json_encode($response);