Remove legacy custom domain code

This commit is contained in:
Kyle Drake 2016-08-09 20:28:29 -07:00
parent b36a062eb4
commit 217333cdff

View file

@ -386,19 +386,12 @@ class Site < Sequel::Model
def save(validate={})
DB.transaction do
is_new = new?
install_custom_domain if !domain.nil? && !domain.empty?
result = super(validate)
install_new_files if is_new
result
end
end
def install_custom_domain
File.open(File.join(DIR_ROOT, 'domains', "#{username}.conf"), 'w') do |file|
file.write render_template('domain.erb')
end
end
def install_new_files
FileUtils.mkdir_p files_path