@@ -368,6 +368,20 @@ class SecurityController extends Controller
 | 
				
			|||||||
                response: 404,
 | 
					                response: 404,
 | 
				
			||||||
                description: 'Private Key not found.',
 | 
					                description: 'Private Key not found.',
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
 | 
					            new OA\Response(
 | 
				
			||||||
 | 
					                response: 422,
 | 
				
			||||||
 | 
					                description: 'Private Key is in use and cannot be deleted.',
 | 
				
			||||||
 | 
					                content: [
 | 
				
			||||||
 | 
					                    new OA\MediaType(
 | 
				
			||||||
 | 
					                        mediaType: 'application/json',
 | 
				
			||||||
 | 
					                        schema: new OA\Schema(
 | 
				
			||||||
 | 
					                            type: 'object',
 | 
				
			||||||
 | 
					                            properties: [
 | 
				
			||||||
 | 
					                                'message' => ['type' => 'string', 'example' => 'Private Key is in use and cannot be deleted.'],
 | 
				
			||||||
 | 
					                            ]
 | 
				
			||||||
 | 
					                        )
 | 
				
			||||||
 | 
					                    ),
 | 
				
			||||||
 | 
					                ]),
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
    )]
 | 
					    )]
 | 
				
			||||||
    public function delete_key(Request $request)
 | 
					    public function delete_key(Request $request)
 | 
				
			||||||
@@ -384,6 +398,14 @@ class SecurityController extends Controller
 | 
				
			|||||||
        if (is_null($key)) {
 | 
					        if (is_null($key)) {
 | 
				
			||||||
            return response()->json(['message' => 'Private Key not found.'], 404);
 | 
					            return response()->json(['message' => 'Private Key not found.'], 404);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ($key->isInUse()) {
 | 
				
			||||||
 | 
					            return response()->json([
 | 
				
			||||||
 | 
					                'message' => 'Private Key is in use and cannot be deleted.',
 | 
				
			||||||
 | 
					                'details' => 'This private key is currently being used by servers, applications, or Git integrations.',
 | 
				
			||||||
 | 
					            ], 422);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $key->forceDelete();
 | 
					        $key->forceDelete();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return response()->json([
 | 
					        return response()->json([
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -103,7 +103,7 @@ class ServicesController extends Controller
 | 
				
			|||||||
                mediaType: 'application/json',
 | 
					                mediaType: 'application/json',
 | 
				
			||||||
                schema: new OA\Schema(
 | 
					                schema: new OA\Schema(
 | 
				
			||||||
                    type: 'object',
 | 
					                    type: 'object',
 | 
				
			||||||
                    required: ['server_uuid', 'project_uuid', 'environment_name', 'environment_uuid', 'type'],
 | 
					                    required: ['server_uuid', 'project_uuid', 'environment_name', 'environment_uuid'],
 | 
				
			||||||
                    properties: [
 | 
					                    properties: [
 | 
				
			||||||
                        'type' => [
 | 
					                        'type' => [
 | 
				
			||||||
                            'description' => 'The one-click service type',
 | 
					                            'description' => 'The one-click service type',
 | 
				
			||||||
@@ -205,6 +205,7 @@ class ServicesController extends Controller
 | 
				
			|||||||
                        'server_uuid' => ['type' => 'string', 'description' => 'Server UUID.'],
 | 
					                        'server_uuid' => ['type' => 'string', 'description' => 'Server UUID.'],
 | 
				
			||||||
                        'destination_uuid' => ['type' => 'string', 'description' => 'Destination UUID. Required if server has multiple destinations.'],
 | 
					                        'destination_uuid' => ['type' => 'string', 'description' => 'Destination UUID. Required if server has multiple destinations.'],
 | 
				
			||||||
                        'instant_deploy' => ['type' => 'boolean', 'default' => false, 'description' => 'Start the service immediately after creation.'],
 | 
					                        'instant_deploy' => ['type' => 'boolean', 'default' => false, 'description' => 'Start the service immediately after creation.'],
 | 
				
			||||||
 | 
					                        'docker_compose_raw' => ['type' => 'string', 'description' => 'The Docker Compose raw content.'],
 | 
				
			||||||
                    ],
 | 
					                    ],
 | 
				
			||||||
                ),
 | 
					                ),
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
@@ -256,7 +257,7 @@ class ServicesController extends Controller
 | 
				
			|||||||
            'environment_name' => 'string|nullable',
 | 
					            'environment_name' => 'string|nullable',
 | 
				
			||||||
            'environment_uuid' => 'string|nullable',
 | 
					            'environment_uuid' => 'string|nullable',
 | 
				
			||||||
            'server_uuid' => 'string|required',
 | 
					            'server_uuid' => 'string|required',
 | 
				
			||||||
            'destination_uuid' => 'string',
 | 
					            'destination_uuid' => 'string|nullable',
 | 
				
			||||||
            'name' => 'string|max:255',
 | 
					            'name' => 'string|max:255',
 | 
				
			||||||
            'description' => 'string|nullable',
 | 
					            'description' => 'string|nullable',
 | 
				
			||||||
            'instant_deploy' => 'boolean',
 | 
					            'instant_deploy' => 'boolean',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -225,7 +225,7 @@ class SettingsEmail extends Component
 | 
				
			|||||||
                'test-email:'.$this->team->id,
 | 
					                'test-email:'.$this->team->id,
 | 
				
			||||||
                $perMinute = 0,
 | 
					                $perMinute = 0,
 | 
				
			||||||
                function () {
 | 
					                function () {
 | 
				
			||||||
                    $this->team?->notify(new Test($this->testEmailAddress, 'email'));
 | 
					                    $this->team?->notify(new Test($this->testEmailAddress));
 | 
				
			||||||
                    $this->dispatch('success', 'Test Email sent.');
 | 
					                    $this->dispatch('success', 'Test Email sent.');
 | 
				
			||||||
                },
 | 
					                },
 | 
				
			||||||
                $decaySeconds = 10,
 | 
					                $decaySeconds = 10,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,10 +16,9 @@ class InvitationLink extends CustomEmailNotification
 | 
				
			|||||||
        return [TransactionalEmailChannel::class];
 | 
					        return [TransactionalEmailChannel::class];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function __construct(public User $user, public bool $isTransactionalEmail)
 | 
					    public function __construct(public User $user, public bool $isTransactionalEmail = true)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $this->onQueue('high');
 | 
					        $this->onQueue('high');
 | 
				
			||||||
        $this->isTransactionalEmail = true;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function toMail(): MailMessage
 | 
					    public function toMail(): MailMessage
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,11 +17,10 @@ class ResetPassword extends Notification
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    public InstanceSettings $settings;
 | 
					    public InstanceSettings $settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function __construct($token, public bool $isTransactionalEmail)
 | 
					    public function __construct($token, public bool $isTransactionalEmail = true)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $this->settings = instanceSettings();
 | 
					        $this->settings = instanceSettings();
 | 
				
			||||||
        $this->token = $token;
 | 
					        $this->token = $token;
 | 
				
			||||||
        $this->isTransactionalEmail = true;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static function createUrlUsing($callback)
 | 
					    public static function createUrlUsing($callback)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,10 +8,9 @@ use Illuminate\Notifications\Messages\MailMessage;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
class Test extends CustomEmailNotification
 | 
					class Test extends CustomEmailNotification
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    public function __construct(public string $emails, public string $isTransactionalEmail)
 | 
					    public function __construct(public string $emails, public bool $isTransactionalEmail = true)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $this->onQueue('high');
 | 
					        $this->onQueue('high');
 | 
				
			||||||
        $this->isTransactionalEmail = true;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function via(): array
 | 
					    public function via(): array
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
return [
 | 
					return [
 | 
				
			||||||
    'coolify' => [
 | 
					    'coolify' => [
 | 
				
			||||||
        'version' => '4.0.0-beta.404',
 | 
					        'version' => '4.0.0-beta.405',
 | 
				
			||||||
        'helper_version' => '1.0.8',
 | 
					        'helper_version' => '1.0.8',
 | 
				
			||||||
        'realtime_version' => '1.0.6',
 | 
					        'realtime_version' => '1.0.6',
 | 
				
			||||||
        'self_hosted' => env('SELF_HOSTED', true),
 | 
					        'self_hosted' => env('SELF_HOSTED', true),
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5900,8 +5900,7 @@
 | 
				
			|||||||
                                    "server_uuid",
 | 
					                                    "server_uuid",
 | 
				
			||||||
                                    "project_uuid",
 | 
					                                    "project_uuid",
 | 
				
			||||||
                                    "environment_name",
 | 
					                                    "environment_name",
 | 
				
			||||||
                                    "environment_uuid",
 | 
					                                    "environment_uuid"
 | 
				
			||||||
                                    "type"
 | 
					 | 
				
			||||||
                                ],
 | 
					                                ],
 | 
				
			||||||
                                "properties": {
 | 
					                                "properties": {
 | 
				
			||||||
                                    "type": {
 | 
					                                    "type": {
 | 
				
			||||||
@@ -6030,6 +6029,10 @@
 | 
				
			|||||||
                                        "type": "boolean",
 | 
					                                        "type": "boolean",
 | 
				
			||||||
                                        "default": false,
 | 
					                                        "default": false,
 | 
				
			||||||
                                        "description": "Start the service immediately after creation."
 | 
					                                        "description": "Start the service immediately after creation."
 | 
				
			||||||
 | 
					                                    },
 | 
				
			||||||
 | 
					                                    "docker_compose_raw": {
 | 
				
			||||||
 | 
					                                        "type": "string",
 | 
				
			||||||
 | 
					                                        "description": "The Docker Compose raw content."
 | 
				
			||||||
                                    }
 | 
					                                    }
 | 
				
			||||||
                                },
 | 
					                                },
 | 
				
			||||||
                                "type": "object"
 | 
					                                "type": "object"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3991,7 +3991,6 @@ paths:
 | 
				
			|||||||
                - project_uuid
 | 
					                - project_uuid
 | 
				
			||||||
                - environment_name
 | 
					                - environment_name
 | 
				
			||||||
                - environment_uuid
 | 
					                - environment_uuid
 | 
				
			||||||
                - type
 | 
					 | 
				
			||||||
              properties:
 | 
					              properties:
 | 
				
			||||||
                type:
 | 
					                type:
 | 
				
			||||||
                  description: 'The one-click service type'
 | 
					                  description: 'The one-click service type'
 | 
				
			||||||
@@ -4024,6 +4023,9 @@ paths:
 | 
				
			|||||||
                  type: boolean
 | 
					                  type: boolean
 | 
				
			||||||
                  default: false
 | 
					                  default: false
 | 
				
			||||||
                  description: 'Start the service immediately after creation.'
 | 
					                  description: 'Start the service immediately after creation.'
 | 
				
			||||||
 | 
					                docker_compose_raw:
 | 
				
			||||||
 | 
					                  type: string
 | 
				
			||||||
 | 
					                  description: 'The Docker Compose raw content.'
 | 
				
			||||||
              type: object
 | 
					              type: object
 | 
				
			||||||
      responses:
 | 
					      responses:
 | 
				
			||||||
        '201':
 | 
					        '201':
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,10 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    "coolify": {
 | 
					    "coolify": {
 | 
				
			||||||
        "v4": {
 | 
					        "v4": {
 | 
				
			||||||
            "version": "4.0.0-beta.404"
 | 
					            "version": "4.0.0-beta.405"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        "nightly": {
 | 
					        "nightly": {
 | 
				
			||||||
            "version": "4.0.0-beta.405"
 | 
					            "version": "4.0.0-beta.406"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        "helper": {
 | 
					        "helper": {
 | 
				
			||||||
            "version": "1.0.8"
 | 
					            "version": "1.0.8"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,10 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    "coolify": {
 | 
					    "coolify": {
 | 
				
			||||||
        "v4": {
 | 
					        "v4": {
 | 
				
			||||||
            "version": "4.0.0-beta.404"
 | 
					            "version": "4.0.0-beta.405"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        "nightly": {
 | 
					        "nightly": {
 | 
				
			||||||
            "version": "4.0.0-beta.405"
 | 
					            "version": "4.0.0-beta.406"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        "helper": {
 | 
					        "helper": {
 | 
				
			||||||
            "version": "1.0.8"
 | 
					            "version": "1.0.8"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user