fix: ApiResponse::handle() 호출 패턴 수정 (callable 사용)
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user