json-api/shared/main.php

14 lines
240 B
PHP
Raw Normal View History

2019-09-14 17:38:35 +02:00
<?php
$webApiVersion = '0.1.0';
function sendResponse($apiResponse) {
global $webApiVersion;
$response = [
'response' => $apiResponse,
'jsonApiVersion' => $webApiVersion,
];
echo json_encode($response);
}