mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 02:16:43 +00:00
refactor: simplify environment variable deletion logic in booted method
This commit is contained in:
1 parent
14ddf2fab1
commit
ebb2f0cc7d
1 file changed
+8
-5
@@ -188,13 +188,16 @@ class Application extends BaseModel
|
|||||||
|
|
||||||
// Remove SERVICE_FQDN_* and SERVICE_URL_* environment variables
|
// Remove SERVICE_FQDN_* and SERVICE_URL_* environment variables
|
||||||
$application->environment_variables()
|
$application->environment_variables()
|
||||||
->where('key', 'LIKE', 'SERVICE_FQDN_%')
|
->where(function ($q) {
|
||||||
->orWhere('key', 'LIKE', 'SERVICE_URL_%')
|
$q->where('key', 'LIKE', 'SERVICE_FQDN_%')
|
||||||
|
->orWhere('key', 'LIKE', 'SERVICE_URL_%');
|
||||||
|
})
|
||||||
->delete();
|
->delete();
|
||||||
|
|
||||||
$application->environment_variables_preview()
|
$application->environment_variables_preview()
|
||||||
->where('key', 'LIKE', 'SERVICE_FQDN_%')
|
->where(function ($q) {
|
||||||
->orWhere('key', 'LIKE', 'SERVICE_URL_%')
|
$q->where('key', 'LIKE', 'SERVICE_FQDN_%')
|
||||||
|
->orWhere('key', 'LIKE', 'SERVICE_URL_%');
|
||||||
|
})
|
||||||
->delete();
|
->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user