refactoring testApi

This commit is contained in:
marko
2023-12-30 11:09:06 +01:00
parent f2cf7ff764
commit 13ea342be8
3 changed files with 81 additions and 21 deletions

View File

@@ -0,0 +1,13 @@
<?php
header('Content-Type: application/json');
// $endpoint = $_SERVER['REQUEST_URI'];
// switch ($endpoint){
// case '/':
// echo json_encode([
// 'message' => 'Welcome to the API'
// ]);
// break;
// }
?>

View File

@@ -8,7 +8,9 @@ require_once("participoLib/shiai.php");
// - we send a json-formatted response
header("Content-Type: application/json");
// - sending body payload
echo json_encode(
Shiai::dbSelect()
echo(
json_encode(
Shiai::dbSelect()
)
);
?>