mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 06:15:13 +00:00
feat(api): unify service creation endpoint and enhance validation
This commit is contained in:
1 parent
d08774d083
commit
120facfca3
6 files changed
+25
-106
No files matched your search
@@ -50,6 +50,11 @@ class Service extends BaseModel
|
||||
|
||||
protected static function booted()
|
||||
{
|
||||
static::creating(function ($service) {
|
||||
if (blank($service->name)) {
|
||||
$service->name = 'service-'.(new Cuid2);
|
||||
}
|
||||
});
|
||||
static::created(function ($service) {
|
||||
$service->compose_parsing_version = self::$parserVersion;
|
||||
$service->save();
|
||||
|
||||
Reference in new issue
Block a user