Commit a376c002 authored by Stuart John Watson's avatar Stuart John Watson

Added extraPayload getting to endpoint.php

parent 612c1aeb
......@@ -39,7 +39,7 @@ $failReason; // If they can't connect contains the reason why.
// create the db object, if the db aint there then make it
if (!file_exists($gameauthDBPATH)){
$db = new SQLite3($gameauthDBPATH);
$db = new SQLite3($gameauthDBPATH) or di("Could not create DB");
$db->exec("CREATE TABLE gamers
(
username TEXT PRIMARY KEY NOT NULL,
......
......@@ -169,4 +169,10 @@
loginError => null
];
}
function serverData(){
chdir('games');
include '_manager.php';
return getGameStatus();
}
?>
......@@ -12,7 +12,9 @@
} else {
$response = login($username,$password);
}
$response["extraPayload"] = [];
chdir('games');
include '_manager.php';
$response["extraPayload"] = getGameStatus();
header('Content-Type: application/json');
echo json_encode($response);
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment