<commit_before>
get '/v0/system/config/default_domain' do
  default_domain = @@core_api.get_default_domain
  unless default_domain.is_a?(FalseClass)
    return default_domain.to_json
  else
    log_error('get default domain')
    status(404)
  end
end

post '/v0/system/config/default_domain' do
  default_domain = params['default_domain']
  return status(202) if @@core_api.set_default_domain(default_domain)
  log_error('default_domain', params)
  return status(404)
end

get '/v0/system/config/default_site' do
  default_site = @@core_api.get_default_site
  unless default_site.is_a?(FalseClass)
    return default_site.to_json
  else
    log_error('get default site')
    status(404)
  end
end

post '/v0/system/config/default_site' do
  default_site = params['default_site']
  return status(202) if @@core_api.set_default_site(default_site)
  log_error('default_site', params)
  return status(404)
end

post '/v0/system/config/hostname' do
  hostname = params['hostname']
  return status(202) if @@core_api.set_hostname(hostname)
  log_error('hostname', params)
  return status(404)
end

get '/v0/system/config/hostname' do
  hostname = @@core_api.system_hostname
  unless hostname.is_a?(FalseClass)
    return hostname.to_json
  else
    log_error('hostname')
    return  status(404)
  end
end

post '/v0/system/config/remote_exception_logging' do
  remote_exception_logging = params['enable'] #symbolize_keys(params)
  unless enable_remote_exception_logging(remote_exception_logging)
    return status(202)
  else
    log_error('remote_exception_logging', params)
    return status(404)
  end
end

get '/v0/system/config/remote_exception_logging' do
  remote_exception_logging = SystemStatus.is_remote_exception_logging?
  unless remote_exception_logging.is_a?(FalseClass)
    status(202)
  else
    log_error('remote_exception_logging')
    return  status(404)
  end  
end
<commit_msg>true or flase no such things as 404<commit_after>
get '/v0/system/config/default_domain' do
  default_domain = @@core_api.get_default_domain
  unless default_domain.is_a?(FalseClass)
    return default_domain.to_json
  else
    log_error('get default domain')
    status(404)
  end
end

post '/v0/system/config/default_domain' do
  default_domain = params['default_domain']
  return status(202) if @@core_api.set_default_domain(default_domain)
  log_error('default_domain', params)
  return status(404)
end

get '/v0/system/config/default_site' do
  default_site = @@core_api.get_default_site
  unless default_site.is_a?(FalseClass)
    return default_site.to_json
  else
    log_error('get default site')
    status(404)
  end
end

post '/v0/system/config/default_site' do
  default_site = params['default_site']
  return status(202) if @@core_api.set_default_site(default_site)
  log_error('default_site', params)
  return status(404)
end

post '/v0/system/config/hostname' do
  hostname = params['hostname']
  return status(202) if @@core_api.set_hostname(hostname)
  log_error('hostname', params)
  return status(404)
end

get '/v0/system/config/hostname' do
  hostname = @@core_api.system_hostname
  unless hostname.is_a?(FalseClass)
    return hostname.to_json
  else
    log_error('hostname')
    return  status(404)
  end
end

post '/v0/system/config/remote_exception_logging' do
  remote_exception_logging = params['enable'] #symbolize_keys(params)
  unless enable_remote_exception_logging(remote_exception_logging)
    return status(202)
  else
    log_error('remote_exception_logging', params)
    return status(404)
  end
end

get '/v0/system/config/remote_exception_logging' do
  remote_exception_logging = SystemStatus.is_remote_exception_logging?
  return remote_exception_logging
    #status(202)
#  else
#    log_error('remote_exception_logging')
#    return  status(404)
  #  end  
end

{'fraction_non_alphanumeric': 0.09876218066894916, 'fraction_numerical': 0.025546484066368186, 'mean_word_length': 5.038155802861685, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2998573', 'n_tokens_mistral': 1324, 'n_tokens_neox': 1279, 'n_words': 249}