From 84127bf7ab7bdfb729557ca2e1391dd271b3d1af Mon Sep 17 00:00:00 2001 From: JonatanRek Date: Fri, 24 Apr 2020 19:05:18 +0200 Subject: [PATCH] Api Controller Progress --- library/ApiController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/ApiController.php b/library/ApiController.php index ebe9854..aee4fa9 100644 --- a/library/ApiController.php +++ b/library/ApiController.php @@ -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(); } } \ No newline at end of file