tests fix
API CI/CD / Validate (composer + pint) (push) Successful in 2m51s
API CI/CD / Test (PHPUnit) (push) Failing after 3m6s
API CI/CD / Build frontend assets (push) Failing after 5m23s
API CI/CD / Security audit (push) Failing after 34s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
API CI/CD / Validate (composer + pint) (push) Successful in 2m51s
API CI/CD / Test (PHPUnit) (push) Failing after 3m6s
API CI/CD / Build frontend assets (push) Failing after 5m23s
API CI/CD / Security audit (push) Failing after 34s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
This commit is contained in:
@@ -35,6 +35,7 @@ use App\Services\Grading\GradingPlacementService;
|
||||
use App\Services\Grading\GradingRefreshService;
|
||||
use App\Services\Grading\GradingScoreService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use RuntimeException;
|
||||
|
||||
class GradingController extends BaseApiController
|
||||
{
|
||||
@@ -143,11 +144,18 @@ class GradingController extends BaseApiController
|
||||
public function refresh(GradingRefreshRequest $request): JsonResponse
|
||||
{
|
||||
$payload = $request->validated();
|
||||
$this->refreshService->refreshSemesterScores(
|
||||
(int) $payload['class_section_id'],
|
||||
(string) $payload['semester'],
|
||||
(string) $payload['school_year']
|
||||
);
|
||||
try {
|
||||
$this->refreshService->refreshSemesterScores(
|
||||
(int) $payload['class_section_id'],
|
||||
(string) $payload['semester'],
|
||||
(string) $payload['school_year']
|
||||
);
|
||||
} catch (RuntimeException $exception) {
|
||||
return response()->json([
|
||||
'ok' => false,
|
||||
'message' => $exception->getMessage(),
|
||||
], 422);
|
||||
}
|
||||
|
||||
return response()->json(['ok' => true]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user