mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 17:21:04 +00:00
refactor: simplify environment variable deletion logic in booted method
This commit is contained in:
@@ -188,13 +188,16 @@ class Application extends BaseModel
|
||||
|
||||
// Remove SERVICE_FQDN_* and SERVICE_URL_* environment variables
|
||||
$application->environment_variables()
|
||||
->where('key', 'LIKE', 'SERVICE_FQDN_%')
|
||||
->orWhere('key', 'LIKE', 'SERVICE_URL_%')
|
||||
->where(function ($q) {
|
||||
$q->where('key', 'LIKE', 'SERVICE_FQDN_%')
|
||||
->orWhere('key', 'LIKE', 'SERVICE_URL_%');
|
||||
})
|
||||
->delete();
|
||||
|
||||
$application->environment_variables_preview()
|
||||
->where('key', 'LIKE', 'SERVICE_FQDN_%')
|
||||
->orWhere('key', 'LIKE', 'SERVICE_URL_%')
|
||||
->where(function ($q) {
|
||||
$q->where('key', 'LIKE', 'SERVICE_FQDN_%')
|
||||
->orWhere('key', 'LIKE', 'SERVICE_URL_%');
|
||||
})
|
||||
->delete();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user