|
@@ -20,7 +20,8 @@ public function index(): JsonResponse
|
|
|
if (!$unitId) {
|
|
if (!$unitId) {
|
|
|
return $this->successResponse(payload: []);
|
|
return $this->successResponse(payload: []);
|
|
|
}
|
|
}
|
|
|
- $items = $this->service->getAllByUnit($unitId);
|
|
|
|
|
|
|
+ // Only return packages the franchisor made visible for this unit
|
|
|
|
|
+ $items = $this->service->getByUnit($unitId);
|
|
|
return $this->successResponse(payload: ClassPackageUnitResource::collection($items));
|
|
return $this->successResponse(payload: ClassPackageUnitResource::collection($items));
|
|
|
}
|
|
}
|
|
|
|
|
|