diff --git a/frontend/modules/api/controllers/RegisterController.php b/frontend/modules/api/controllers/RegisterController.php index e887766..ec1d810 100644 --- a/frontend/modules/api/controllers/RegisterController.php +++ b/frontend/modules/api/controllers/RegisterController.php @@ -76,13 +76,13 @@ class RegisterController extends ApiController /** @var User $user */ if ($user = $model->signup()) { $this->emailService->sendEmail(new RegistrationEmail($user)); - return [ + return $this->asJson([ 'id' => $user->id, - ]; + ]); } } - return null; + return $this->asJson(['errors' => $model->errors]); } /**