update fix deadcode, security

This commit is contained in:
baodev0
2026-09-28 08:26:29 +07:00
parent 3af59bd9c5
commit 82080b5b84
452 changed files with 4857 additions and 26289 deletions
@@ -16,7 +16,6 @@ use App\Models\Product;
use App\Models\Service;
use App\Models\Transaction;
use App\Models\VirtualMachines;
use App\Repositories\Customer\CustomerRepositoryInterface;
use App\Repositories\Module\Hosting\HostingRepositoryInterface as ModuleHostingRepositoryInterface;
use App\Repositories\Module\Vmware\VmwareRepositoryInterface;
use App\Repositories\Service\ServiceRepositoryInterface;
@@ -33,45 +32,11 @@ class CustomerServiceProvisioningService
use ResolvesCustomer;
public function __construct(
private readonly CustomerRepositoryInterface $customerRepository,
private readonly ModuleHostingRepositoryInterface $moduleHostingRepository,
private readonly VmwareRepositoryInterface $vmwareRepository,
private readonly ServiceRepositoryInterface $serviceRepository,
) {}
public function getProducts(string $uuid): Collection
{
$customer = $this->resolveCustomer($uuid);
$hostingServices = $this->moduleHostingRepository->filter(['customer_id' => $customer->id], ['server']);
$vpsServices = $this->vmwareRepository->filter(
['customer_id' => $customer->id],
['ipaddress.host.datacenter.vCenter', 'os.osGroup'],
);
$allService = collect();
foreach ($hostingServices as $hosting) {
$allService->push([
'product_id' => $hosting->id,
'product_type' => 3,
'name' => $hosting->name,
'description' => $hosting->name . ' (Hosting)',
]);
}
foreach ($vpsServices as $vps) {
$allService->push([
'product_id' => $vps->id,
'product_type' => 4,
'name' => $vps->name,
'description' => $vps->name . ' (VPS)',
]);
}
return $allService->values();
}
public function getServices(string $uuid): Collection
{
$services = $this->serviceRepository->filter(
@@ -397,5 +362,4 @@ class CustomerServiceProvisioningService
return $vm;
});
}
}