fix: ApiResponse::handle() 호출 패턴 수정 (callable 사용)

This commit is contained in:
2026-01-21 10:29:59 +09:00
parent ca833406a3
commit ebc1794b56
6 changed files with 31 additions and 36 deletions

View File

@@ -42,16 +42,13 @@ public function summary(Request $request)
$type = $validated['type'] ?? null;
$departmentFilter = $validated['department_filter'] ?? 'all';
$data = $this->calendarService->getSchedules(
$startDate,
$endDate,
$type,
$departmentFilter
);
return ApiResponse::handle(
data: $data,
message: __('message.fetched')
);
return ApiResponse::handle(function () use ($startDate, $endDate, $type, $departmentFilter) {
return $this->calendarService->getSchedules(
$startDate,
$endDate,
$type,
$departmentFilter
);
}, __('message.fetched'));
}
}