Api Controller Progress

This commit is contained in:
JonatanRek 2020-04-24 19:05:18 +02:00
parent 34ee711182
commit 84127bf7ab
1 changed files with 3 additions and 3 deletions

View File

@ -22,9 +22,9 @@ class ApiCOntroller {
}
}
function response(){
http_response_code($this->httpCode);
echo json_encode($this->data);
function response($data = [], $httpCode = '200'){
http_response_code($httpCode);
echo json_encode($data);
die();
}
}