refactoring testApi
This commit is contained in:
13
homepage/participo/api/index.php
Normal file
13
homepage/participo/api/index.php
Normal 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;
|
||||
// }
|
||||
?>
|
||||
@@ -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()
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user