mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-04 10:42:23 +00:00
fix(api): point rejected fqdn field to domains on application writes (#12217)
This commit is contained in:
1 parent
91bd773ef2
commit
59793b060c
2 files changed
+78
-2
No files matched your search
@@ -239,6 +239,11 @@ class ApplicationsController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
private function extraApplicationFieldMessage(string $field): string
|
||||
{
|
||||
return $field === 'fqdn' ? 'Use the domains field to set application URLs.' : 'This field is not allowed.';
|
||||
}
|
||||
|
||||
/**
|
||||
* Expose sensitive fields on eager-loaded nested Server + ServerSetting
|
||||
* relations for callers with the `read:sensitive` or `root` token ability.
|
||||
@@ -1315,7 +1320,7 @@ class ApplicationsController extends Controller
|
||||
$errors = $validator->errors();
|
||||
if (! empty($extraFields)) {
|
||||
foreach ($extraFields as $field) {
|
||||
$errors->add($field, 'This field is not allowed.');
|
||||
$errors->add($field, $this->extraApplicationFieldMessage($field));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3394,7 +3399,7 @@ class ApplicationsController extends Controller
|
||||
$errors = $validator->errors();
|
||||
if (! empty($extraFields)) {
|
||||
foreach ($extraFields as $field) {
|
||||
$errors->add($field, 'This field is not allowed.');
|
||||
$errors->add($field, $this->extraApplicationFieldMessage($field));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user