Skip to content

Commit

Permalink
fix: apiresourcecontroller missing errorMessages
Browse files Browse the repository at this point in the history
  • Loading branch information
zerkxubas committed Jun 26, 2024
1 parent b41429b commit 6fa90fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Http/Controllers/ApiResponseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public function sendError($error, $errorMessages = [], $code = StatusCode::NOT_F
'message' => $error,
];

if (!empty($errorMessage)) {
$response['data'] = $errorMessage;
if (!empty($errorMessages)) {
$response['data'] = $errorMessages;
}

return response()->json($response, $code);
Expand Down

0 comments on commit 6fa90fd

Please sign in to comment.