Had to fix namespacing issue with the table api endpoint.

This commit is contained in:
2023-05-27 16:42:36 -05:00
parent 81533b93fe
commit e107baf3ab
2 changed files with 7 additions and 3 deletions

View File

@@ -10,11 +10,15 @@ GET:
*/
require('../Libraries/table/get.php');
namespace table;
use SQLite3;
$root = $_SERVER['DOCUMENT_ROOT'];
$GLOBALS['db'] = new SQLite3("../../webcron.db");
require("$root/Libraries/table/get.php");
# Setting up DB connection
$GLOBALS['db'] = new SQLite3("../../webcron.db");
switch ($_SERVER['REQUEST_METHOD']) {
case 'GET':