wip: rest api user endpoint
This commit is contained in:
@@ -39,15 +39,23 @@ $wkSqlQuery = "SELECT DISTINCT"
|
||||
|
||||
$wkSqlResponse = dbConnector::query($wkSqlQuery);
|
||||
|
||||
// Postprocessing
|
||||
// - convert the comma separated list into an array
|
||||
foreach( $wkSqlResponse as &$user){
|
||||
$user['eMail'] = explode(",", $user['eMail']);
|
||||
foreach( $user['eMail'] as &$email){
|
||||
$email = trim($email);
|
||||
}
|
||||
}
|
||||
|
||||
header('Access-Control-Allow-Headers: *');
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
|
||||
// Sending Response
|
||||
// - setting header
|
||||
header('Content-Type: application/json');
|
||||
// - sending body payload
|
||||
echo(
|
||||
json_encode($wkSqlResponse)
|
||||
// json_encode(getallheaders())
|
||||
// json_encode($_SERVER)
|
||||
);
|
||||
|
||||
// @todo Should not be necessary. But until the problem with the timeout time of the requesting client is solved, this explicit exit() stands!
|
||||
exit(0);
|
||||
?>
|
||||
Reference in New Issue
Block a user