new file: database/sqlite.php new file: registration.php renamed: module/report/routes.php -> report.php renamed: module/update/routes.php -> update.php
16 lines
387 B
PHP
16 lines
387 B
PHP
<?php
|
|
// Reporting endpoint for sensors to report the temperature of each of its sensors etc.
|
|
|
|
|
|
$router->get('/report', function($req) {
|
|
echo "Nothing to see here!\n";
|
|
http_response_code(200);
|
|
});
|
|
|
|
$router->post('/report', function($req) {
|
|
echo 'body:' . var_dump($req->getBody()) . "\n";
|
|
DumpHTTPRequestToFile::execute("/tmp/out.txt");
|
|
http_response_code(200);
|
|
});
|
|
|