Update services controller to include new service envs commands

This commit is contained in:
Andras Bacsai
2024-09-06 10:48:47 +02:00
parent 8d2b280b03
commit ec7b18556e

View File

@@ -483,7 +483,6 @@ class ServicesController extends Controller
]); ]);
} }
#[OA\Get( #[OA\Get(
summary: 'List Envs', summary: 'List Envs',
description: 'List all envs by service UUID.', description: 'List all envs by service UUID.',
@@ -542,9 +541,8 @@ class ServicesController extends Controller
if (! $service) { if (! $service) {
return response()->json(['message' => 'Service not found.'], 404); return response()->json(['message' => 'Service not found.'], 404);
} }
$envs = $service->environment_variables->sortBy('id');
$envs = $envs->map(function ($env) { $envs = $service->environment_variables->map(function ($env) {
$env->makeHidden([ $env->makeHidden([
'application_id', 'application_id',
'standalone_clickhouse_id', 'standalone_clickhouse_id',
@@ -560,6 +558,8 @@ class ServicesController extends Controller
return $env; return $env;
}); });
return response()->json($envs);
} }
#[OA\Patch( #[OA\Patch(