From 61d1aa04d8d44b17bfe6dace90088669fc6c3df8 Mon Sep 17 00:00:00 2001 From: Kyle McFarland Date: Wed, 31 Jan 2018 00:51:07 -0600 Subject: Initial import * Registration system's almost done * Just part way through implementing tasks So not much done yet, but it's a start. --- tasks_api.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tasks_api.php (limited to 'tasks_api.php') diff --git a/tasks_api.php b/tasks_api.php new file mode 100644 index 0000000..e65b0e9 --- /dev/null +++ b/tasks_api.php @@ -0,0 +1,28 @@ + $task) { + $task->load_admin($db); + $task->load_tdcs($db, false); + } + header("Content-Type: application/json"); + // TODO: this should probably use tasks->to_json instead so as to not serialize more than needed + echo json_encode($tasks); + //var_dump($tasks); +} + +$mapping = array( + "get_all_tasks_simple" => "\mcoop\get_all_tasks_simple" +); + +if (isset($_GET["action"])) { + $action = $_GET["action"]; + if (array_key_exists($action, $mapping)) { + $funcname = $mapping[$action]; + $funcname($db); + } +} +?> -- cgit v1.1