mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-21 00:17:25 +00:00
fix: api updates
This commit is contained in:
1 parent
4459c9f73d
commit
b24a489c77
14 files changed
+216
-328
No files matched your search
@@ -17,21 +17,18 @@ class EnvironmentVariablesController extends Controller
|
||||
$env = EnvironmentVariable::where('uuid', $request->env_uuid)->first();
|
||||
if (! $env) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Environment variable not found.',
|
||||
], 404);
|
||||
}
|
||||
$found_app = $env->resource()->whereRelation('environment.project.team', 'id', $teamId)->first();
|
||||
if (! $found_app) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Environment variable not found.',
|
||||
], 404);
|
||||
}
|
||||
$env->delete();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => 'Environment variable deleted.',
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user