refactor(api): modify service sub container retrieval filter to use coolify.name

This commit is contained in:
Yanluis Fermin
2025-07-30 13:55:02 -04:00
parent 28e20473da
commit c239b8bbba
2 changed files with 4 additions and 10 deletions
@@ -536,14 +536,8 @@ class ServicesController extends Controller
return response()->json(['message' => 'Service not found.'], 404);
}
$containers = getCurrentServiceSubContainerStatus($service->destination->server, $service->id, $subServiceName);
if ($containers->count() == 0) {
return response()->json([
'message' => 'Service is not running.',
], 400);
}
$name = "{$subServiceName}-{$service->uuid}";
$containers = getCurrentServiceSubContainerStatus($service->destination->server, $service->id, $name);
$container = $containers->first();
if (! $container) {