Attempting a simpler configuration. Podman doesn't like it. Moving to Docker for sanity check.
This commit is contained in:
13
adm/cal/api.php
Normal file
13
adm/cal/api.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
header("Content-Type: application/json");
|
||||
include('lib/main.php');
|
||||
$ret = array( "err" => "unknown command" );
|
||||
if ( in_array("cmd", array_keys($_GET)) and $_GET["cmd"] == "get" ) {
|
||||
$ret = getEvents();
|
||||
} elseif ( $_POST["cmd"] == "put" ) {
|
||||
$json = base64_decode($_POST["payload"]);
|
||||
file_put_contents("dat/events.json", $json);
|
||||
$ret = getEvents();
|
||||
}
|
||||
print(json_encode($ret));
|
||||
?>
|
||||
Reference in New Issue
Block a user