fix gitlab tests

This commit is contained in:
root
2026-06-09 02:32:58 -04:00
parent 20a0b6c4e5
commit 6def9993da
1489 changed files with 10449 additions and 11356 deletions
@@ -21,10 +21,10 @@ class TeacherAttendanceApiController extends Controller
public function grid(Request $request): TeacherGridResource
{
$semester = (string) ($request->query('semester') ?: $this->attendanceService->currentSemester());
$schoolYear = (string) ($request->query('school_year') ?: $this->attendanceService->currentSchoolYear());
$date = (string) ($request->query('date') ?: now()->toDateString());
$sectionCode = (int) $request->query('class_section_id', 0);
$semester = (string)($request->query('semester') ?: $this->attendanceService->currentSemester());
$schoolYear = (string)($request->query('school_year') ?: $this->attendanceService->currentSchoolYear());
$date = (string)($request->query('date') ?: now()->toDateString());
$sectionCode = (int)$request->query('class_section_id', 0);
return new TeacherGridResource(
$this->queryService->teacherGrid($semester, $schoolYear, $date, $sectionCode)
@@ -42,7 +42,7 @@ class TeacherAttendanceApiController extends Controller
return new TeacherAttendanceFormResource(
$this->queryService->teacherAttendanceFormData(
$guard,
(int) $request->query('class_section_id', 0)
(int)$request->query('class_section_id', 0)
)
);
} catch (Throwable $e) {
@@ -66,6 +66,9 @@ class TeacherAttendanceApiController extends Controller
}
}
/**
* @return int|JsonResponse
*/
private function authenticatedUserIdOrUnauthorized(): int|JsonResponse
{
$userId = (int) (auth()->id() ?? 0);
@@ -75,4 +78,4 @@ class TeacherAttendanceApiController extends Controller
return $userId;
}
}
}