add tests batch 20
This commit is contained in:
@@ -72,7 +72,7 @@ class FamilyAdminController extends BaseApiController
|
||||
$schoolYear
|
||||
);
|
||||
|
||||
if (! $family) {
|
||||
if (!$family) {
|
||||
return $this->error('Family not found.', Response::HTTP_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -92,9 +92,8 @@ class FamilyAdminController extends BaseApiController
|
||||
$payload['reply_to_name'] ?? null
|
||||
);
|
||||
|
||||
if (! $ok) {
|
||||
if (!$ok) {
|
||||
Log::warning('Compose email failed for family admin', ['recipient' => $payload['recipient']]);
|
||||
|
||||
return $this->error('Unable to send email.', Response::HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,8 +53,7 @@ class FamilyController extends BaseApiController
|
||||
try {
|
||||
$result = $this->mutationService->bootstrapFamilies();
|
||||
} catch (\Throwable $e) {
|
||||
Log::error('Family bootstrap failed: '.$e->getMessage());
|
||||
|
||||
Log::error('Family bootstrap failed: ' . $e->getMessage());
|
||||
return $this->error('Family bootstrap failed.', Response::HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
@@ -70,7 +69,7 @@ class FamilyController extends BaseApiController
|
||||
(string) ($payload['relation'] ?? 'secondary')
|
||||
);
|
||||
|
||||
if (! ($result['ok'] ?? false)) {
|
||||
if (!($result['ok'] ?? false)) {
|
||||
return $this->error($result['message'] ?? 'Unable to attach guardian.', Response::HTTP_UNPROCESSABLE_ENTITY);
|
||||
}
|
||||
|
||||
@@ -89,12 +88,11 @@ class FamilyController extends BaseApiController
|
||||
(string) ($payload['relation'] ?? 'secondary')
|
||||
);
|
||||
} catch (\Throwable $e) {
|
||||
Log::error('Attach guardian by email failed: '.$e->getMessage());
|
||||
|
||||
Log::error('Attach guardian by email failed: ' . $e->getMessage());
|
||||
return $this->error('Unable to attach guardian.', Response::HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
if (! ($result['ok'] ?? false)) {
|
||||
if (!($result['ok'] ?? false)) {
|
||||
return $this->error($result['message'] ?? 'Unable to attach guardian.', Response::HTTP_UNPROCESSABLE_ENTITY);
|
||||
}
|
||||
|
||||
@@ -158,12 +156,11 @@ class FamilyController extends BaseApiController
|
||||
try {
|
||||
$result = $this->mutationService->importSecondParentsFromLegacy();
|
||||
} catch (\Throwable $e) {
|
||||
Log::error('Legacy second parent import failed: '.$e->getMessage());
|
||||
|
||||
Log::error('Legacy second parent import failed: ' . $e->getMessage());
|
||||
return $this->error('Legacy import failed.', Response::HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
if (! ($result['ok'] ?? true)) {
|
||||
if (!($result['ok'] ?? true)) {
|
||||
return $this->error($result['message'] ?? 'Legacy import failed.', Response::HTTP_UNPROCESSABLE_ENTITY);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user