@@ -932,7 +932,7 @@ private function create_application(Request $request, $type)
932932 if ($ return instanceof \Illuminate \Http \JsonResponse) {
933933 return $ return ;
934934 }
935- $ allowedFields = ['project_uuid ' , 'environment_name ' , 'environment_uuid ' , 'server_uuid ' , 'destination_uuid ' , 'type ' , 'name ' , 'description ' , 'is_static ' , 'domains ' , 'git_repository ' , 'git_branch ' , 'git_commit_sha ' , 'private_key_uuid ' , 'docker_registry_image_name ' , 'docker_registry_image_tag ' , 'build_pack ' , 'install_command ' , 'build_command ' , 'start_command ' , 'ports_exposes ' , 'ports_mappings ' , 'base_directory ' , 'publish_directory ' , 'health_check_enabled ' , 'health_check_path ' , 'health_check_port ' , 'health_check_host ' , 'health_check_method ' , 'health_check_return_code ' , 'health_check_scheme ' , 'health_check_response_text ' , 'health_check_interval ' , 'health_check_timeout ' , 'health_check_retries ' , 'health_check_start_period ' , 'limits_memory ' , 'limits_memory_swap ' , 'limits_memory_swappiness ' , 'limits_memory_reservation ' , 'limits_cpus ' , 'limits_cpuset ' , 'limits_cpu_shares ' , 'custom_labels ' , 'custom_docker_run_options ' , 'post_deployment_command ' , 'post_deployment_command_container ' , 'pre_deployment_command ' , 'pre_deployment_command_container ' , 'manual_webhook_secret_github ' , 'manual_webhook_secret_gitlab ' , 'manual_webhook_secret_bitbucket ' , 'manual_webhook_secret_gitea ' , 'redirect ' , 'github_app_uuid ' , 'instant_deploy ' , 'dockerfile ' , 'docker_compose_location ' , 'docker_compose_raw ' , 'docker_compose_custom_start_command ' , 'docker_compose_custom_build_command ' , 'docker_compose_domains ' , 'watch_paths ' , 'use_build_server ' , 'static_image ' , 'custom_nginx_configuration ' , 'is_http_basic_auth_enabled ' , 'http_basic_auth_username ' , 'http_basic_auth_password ' , 'connect_to_docker_network ' , 'force_domain_override ' , 'autogenerate_domain ' ];
935+ $ allowedFields = ['project_uuid ' , 'environment_name ' , 'environment_uuid ' , 'server_uuid ' , 'destination_uuid ' , 'type ' , 'name ' , 'description ' , 'is_static ' , 'domains ' , 'git_repository ' , 'git_branch ' , 'git_commit_sha ' , 'private_key_uuid ' , 'docker_registry_image_name ' , 'docker_registry_image_tag ' , 'docker_registry_id ' , 'build_pack ' , 'install_command ' , 'build_command ' , 'start_command ' , 'ports_exposes ' , 'ports_mappings ' , 'base_directory ' , 'publish_directory ' , 'health_check_enabled ' , 'health_check_path ' , 'health_check_port ' , 'health_check_host ' , 'health_check_method ' , 'health_check_return_code ' , 'health_check_scheme ' , 'health_check_response_text ' , 'health_check_interval ' , 'health_check_timeout ' , 'health_check_retries ' , 'health_check_start_period ' , 'limits_memory ' , 'limits_memory_swap ' , 'limits_memory_swappiness ' , 'limits_memory_reservation ' , 'limits_cpus ' , 'limits_cpuset ' , 'limits_cpu_shares ' , 'custom_labels ' , 'custom_docker_run_options ' , 'post_deployment_command ' , 'post_deployment_command_container ' , 'pre_deployment_command ' , 'pre_deployment_command_container ' , 'manual_webhook_secret_github ' , 'manual_webhook_secret_gitlab ' , 'manual_webhook_secret_bitbucket ' , 'manual_webhook_secret_gitea ' , 'redirect ' , 'github_app_uuid ' , 'instant_deploy ' , 'dockerfile ' , 'docker_compose_location ' , 'docker_compose_raw ' , 'docker_compose_custom_start_command ' , 'docker_compose_custom_build_command ' , 'docker_compose_domains ' , 'watch_paths ' , 'use_build_server ' , 'static_image ' , 'custom_nginx_configuration ' , 'is_http_basic_auth_enabled ' , 'http_basic_auth_username ' , 'http_basic_auth_password ' , 'connect_to_docker_network ' , 'force_domain_override ' , 'autogenerate_domain ' ];
936936
937937 $ validator = customApiValidator ($ request ->all (), [
938938 'name ' => 'string|max:255 ' ,
@@ -945,6 +945,7 @@ private function create_application(Request $request, $type)
945945 'is_http_basic_auth_enabled ' => 'boolean ' ,
946946 'http_basic_auth_username ' => 'string|nullable ' ,
947947 'http_basic_auth_password ' => 'string|nullable ' ,
948+ 'docker_registry_id ' => 'integer|nullable|exists:docker_registries,id ' ,
948949 'autogenerate_domain ' => 'boolean ' ,
949950 ]);
950951
@@ -2136,7 +2137,7 @@ public function update_by_uuid(Request $request)
21362137 $ this ->authorize ('update ' , $ application );
21372138
21382139 $ server = $ application ->destination ->server ;
2139- $ allowedFields = ['name ' , 'description ' , 'is_static ' , 'domains ' , 'git_repository ' , 'git_branch ' , 'git_commit_sha ' , 'docker_registry_image_name ' , 'docker_registry_image_tag ' , 'build_pack ' , 'static_image ' , 'install_command ' , 'build_command ' , 'start_command ' , 'ports_exposes ' , 'ports_mappings ' , 'base_directory ' , 'publish_directory ' , 'health_check_enabled ' , 'health_check_path ' , 'health_check_port ' , 'health_check_host ' , 'health_check_method ' , 'health_check_return_code ' , 'health_check_scheme ' , 'health_check_response_text ' , 'health_check_interval ' , 'health_check_timeout ' , 'health_check_retries ' , 'health_check_start_period ' , 'limits_memory ' , 'limits_memory_swap ' , 'limits_memory_swappiness ' , 'limits_memory_reservation ' , 'limits_cpus ' , 'limits_cpuset ' , 'limits_cpu_shares ' , 'custom_labels ' , 'custom_docker_run_options ' , 'post_deployment_command ' , 'post_deployment_command_container ' , 'pre_deployment_command ' , 'pre_deployment_command_container ' , 'watch_paths ' , 'manual_webhook_secret_github ' , 'manual_webhook_secret_gitlab ' , 'manual_webhook_secret_bitbucket ' , 'manual_webhook_secret_gitea ' , 'docker_compose_location ' , 'docker_compose_raw ' , 'docker_compose_custom_start_command ' , 'docker_compose_custom_build_command ' , 'docker_compose_domains ' , 'redirect ' , 'instant_deploy ' , 'use_build_server ' , 'custom_nginx_configuration ' , 'is_http_basic_auth_enabled ' , 'http_basic_auth_username ' , 'http_basic_auth_password ' , 'connect_to_docker_network ' , 'force_domain_override ' ];
2140+ $ allowedFields = ['name ' , 'description ' , 'is_static ' , 'domains ' , 'git_repository ' , 'git_branch ' , 'git_commit_sha ' , 'docker_registry_image_name ' , 'docker_registry_image_tag ' , 'docker_registry_id ' , 'build_pack ' , 'static_image ' , 'install_command ' , 'build_command ' , 'start_command ' , 'ports_exposes ' , 'ports_mappings ' , 'base_directory ' , 'publish_directory ' , 'health_check_enabled ' , 'health_check_path ' , 'health_check_port ' , 'health_check_host ' , 'health_check_method ' , 'health_check_return_code ' , 'health_check_scheme ' , 'health_check_response_text ' , 'health_check_interval ' , 'health_check_timeout ' , 'health_check_retries ' , 'health_check_start_period ' , 'limits_memory ' , 'limits_memory_swap ' , 'limits_memory_swappiness ' , 'limits_memory_reservation ' , 'limits_cpus ' , 'limits_cpuset ' , 'limits_cpu_shares ' , 'custom_labels ' , 'custom_docker_run_options ' , 'post_deployment_command ' , 'post_deployment_command_container ' , 'pre_deployment_command ' , 'pre_deployment_command_container ' , 'watch_paths ' , 'manual_webhook_secret_github ' , 'manual_webhook_secret_gitlab ' , 'manual_webhook_secret_bitbucket ' , 'manual_webhook_secret_gitea ' , 'docker_compose_location ' , 'docker_compose_raw ' , 'docker_compose_custom_start_command ' , 'docker_compose_custom_build_command ' , 'docker_compose_domains ' , 'redirect ' , 'instant_deploy ' , 'use_build_server ' , 'custom_nginx_configuration ' , 'is_http_basic_auth_enabled ' , 'http_basic_auth_username ' , 'http_basic_auth_password ' , 'connect_to_docker_network ' , 'force_domain_override ' ];
21402141
21412142 $ validationRules = [
21422143 'name ' => 'string|max:255 ' ,
@@ -2152,6 +2153,7 @@ public function update_by_uuid(Request $request)
21522153 'is_http_basic_auth_enabled ' => 'boolean|nullable ' ,
21532154 'http_basic_auth_username ' => 'string ' ,
21542155 'http_basic_auth_password ' => 'string ' ,
2156+ 'docker_registry_id ' => 'integer|nullable|exists:docker_registries,id ' ,
21552157 ];
21562158 $ validationRules = array_merge (sharedDataApplications (), $ validationRules );
21572159 $ validator = customApiValidator ($ request ->all (), $ validationRules );
0 commit comments