modified: app.php
new file: database/sqlite.php new file: registration.php renamed: module/report/routes.php -> report.php renamed: module/update/routes.php -> update.php
This commit is contained in:
1 parent
96a281ae00
commit
9c2de8aad5
5 files changed
+36
-4
No files matched your search
+12
-4
@@ -1,10 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once('router.php');
|
|
||||||
require_once('debug.php');
|
require_once('debug.php');
|
||||||
|
require_once('router.php');
|
||||||
$router = new Router(new Request);
|
$router = new Router(new Request);
|
||||||
|
|
||||||
require_once('module/update/routes.php');
|
require_once('database/sqlite.php');
|
||||||
require_once('module/report/routes.php');
|
$db = new DB();
|
||||||
|
|
||||||
|
$router->get('/', function($req) {
|
||||||
|
echo "Nothing to see here!\n";
|
||||||
|
http_response_code(200);
|
||||||
|
});
|
||||||
|
|
||||||
|
require_once('update.php');
|
||||||
|
require_once('report.php');
|
||||||
|
require_once('registration.php');
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
class DB
|
||||||
|
{
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
//echo "Time to set up!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
// Device registration endpoint
|
||||||
|
|
||||||
|
$router->get('/registration', function($req) {
|
||||||
|
echo "Nothing to see here at registration!\n";
|
||||||
|
http_response_code(200);
|
||||||
|
});
|
||||||
|
|
||||||
|
$router->post('/registration', function($req) {
|
||||||
|
echo 'body:' . var_dump($req->getBody()) . "\n";
|
||||||
|
//DumpHTTPRequestToFile::execute("/tmp/out.txt");
|
||||||
|
http_response_code(200);
|
||||||
|
});
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user