Skip to content

Commit

Permalink
fix(authentication): correct the successful outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Jul 29, 2023
1 parent 44eb2be commit 474322a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/Controllers/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,16 @@ public function customRegisterAction(): ResponseInterface {
$raw_errors = $session->getFlashdata("errors");
if (is_null($raw_errors)) {
$message = $session->getFlashdata("message");
if (is_null($message)) {
if (!is_null($message)) {
$new_response = $new_response
->setStatusCode(201)
->setJSON([
"meta" => [
"message" => $message
]
]);
}

$new_response = $new_response->setStatusCode(200);
$new_response = $new_response->setStatusCode(201);
} else {
$formalized_errors = [];

Expand Down

0 comments on commit 474322a

Please sign in to comment.