Преглед на файлове

feat(packages): corrige, buscando apenas visible true

ebagabee преди 3 седмици
родител
ревизия
aa243e2fb3
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      app/Http/Controllers/ClassPackageUnitController.php

+ 2 - 1
app/Http/Controllers/ClassPackageUnitController.php

@@ -20,7 +20,8 @@ public function index(): JsonResponse
         if (!$unitId) {
             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));
     }