Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Set NULL if data array is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
binal-7span committed Nov 8, 2019
1 parent c5c7bf6 commit 7b429ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/endpoints/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function authenticate(Request $request, Response $response)
}
unset($responseData['data']['user']);
}
$responseData['data'] = !empty($responseData['data']) ? $responseData['data'] : null;
return $this->responseWithData($request, $response, $responseData);
}

Expand Down

0 comments on commit 7b429ab

Please sign in to comment.