|  |  | @ -19,19 +19,21 @@ class AccountsController < ApplicationController | 
			
		
	
		
		
			
				
					
					|  |  |  |   def update |  |  |  |   def update | 
			
		
	
		
		
			
				
					
					|  |  |  |     current_account.update!(account_params) |  |  |  |     current_account.update!(account_params) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @encrypted_config = EncryptedConfig.find_or_initialize_by(account: current_account, |  |  |  |     unless Docuseal.multitenant? | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                                               key: EncryptedConfig::APP_URL_KEY) |  |  |  |       @encrypted_config = EncryptedConfig.find_or_initialize_by(account: current_account, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     @encrypted_config.assign_attributes(app_url_params) |  |  |  |                                                                 key: EncryptedConfig::APP_URL_KEY) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       @encrypted_config.assign_attributes(app_url_params) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     unless URI.parse(@encrypted_config.value.to_s).class.in?([URI::HTTP, URI::HTTPS]) |  |  |  |       unless URI.parse(@encrypted_config.value.to_s).class.in?([URI::HTTP, URI::HTTPS]) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       @encrypted_config.errors.add(:value, I18n.t('should_be_a_valid_url')) |  |  |  |         @encrypted_config.errors.add(:value, I18n.t('should_be_a_valid_url')) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       return render :show, status: :unprocessable_entity |  |  |  |         return render :show, status: :unprocessable_entity | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |       end | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @encrypted_config.save! |  |  |  |       @encrypted_config.save! | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     Docuseal.refresh_default_url_options! |  |  |  |       Docuseal.refresh_default_url_options! | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     with_locale do |  |  |  |     with_locale do | 
			
		
	
		
		
			
				
					
					|  |  |  |       redirect_to settings_account_path, notice: I18n.t('account_information_has_been_updated') |  |  |  |       redirect_to settings_account_path, notice: I18n.t('account_information_has_been_updated') | 
			
		
	
	
		
		
			
				
					|  |  | 
 |