Skip to content

Commit

Permalink
Update Response.php
Browse files Browse the repository at this point in the history
  • Loading branch information
asilvafx authored Nov 16, 2024
1 parent 6cc7b20 commit fb0bbef
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/core/models/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
class Response extends \Prefab {

function json($status, $message=null){
if(empty($message) || is_null($message)){
$response = $status;
} else {
$response = array('status' => $status, 'message' => $message);
}
$response = array('status' => $status, 'message' => $message);

header('Content-Type: application/json; charset=utf-8');
echo json_encode($response);
Expand Down

0 comments on commit fb0bbef

Please sign in to comment.