instances added god may help
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace MintyPHP\Http;
|
||||
|
||||
use MintyPHP\Service\Audit\ApiAuditService;
|
||||
|
||||
class ApiResponse
|
||||
{
|
||||
public static function success(array $data = [], int $status = 200): never
|
||||
@@ -139,7 +137,7 @@ class ApiResponse
|
||||
}
|
||||
|
||||
if ($body === null) {
|
||||
ApiAuditService::finish($status, $errorCode);
|
||||
\auditServicesFactory()->createApiAuditService()->finish($status, $errorCode);
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -152,7 +150,7 @@ class ApiResponse
|
||||
}
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
ApiAuditService::finish($status, $errorCode);
|
||||
\auditServicesFactory()->createApiAuditService()->finish($status, $errorCode);
|
||||
die($json);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user