* @license https://files.froxlor.org/misc/COPYING.txt GPLv2 */ use Froxlor\Api\Api; use Froxlor\Api\Response; require __DIR__ . '/vendor/autoload.php'; require __DIR__ . '/lib/functions.php'; require __DIR__ . '/lib/tables.inc.php'; // set error-handler @set_error_handler([ '\\Froxlor\\Api\\Api', 'phpErrHandler' ]); // Return response try { echo (new Api)->formatMiddleware(@file_get_contents('php://input'))->handle(); } catch (Exception $e) { echo Response::jsonErrorResponse($e->getMessage(), $e->getCode()); }