fixed MPAjax to behave with router

This commit is contained in:
Jonathan Labreuille
2015-08-18 15:29:00 +02:00
parent e925b14aae
commit 58d83f5fbe
3 changed files with 37 additions and 39 deletions

View File

@ -23,9 +23,9 @@ class Router {
$class = ucfirst($_POST['endpoint']);
$endpoint = __NAMESPACE__ . "\\" . $class;
$method = $_POST['method'];
$args = $_POST['args'];
$data = $_POST['data'];
$endpoint = new $endpoint();
$endpoint->$method($args);
$endpoint->$method($data);
}
function setToken() {