Sha256: 8f9d01603e8668f26b6e22e593d04bcd05bb6abaf515c9b88897d822eca7a688

Contents?: true

Size: 445 Bytes

Versions: 15

Compression:

Stored size: 445 Bytes

Contents

Server.api :list_sources, :source  do |params,user|
  sources = App.load(APP_NAME).sources
  if params[:partition_type].nil? or params[:partition_type] == 'all'
    sources.to_json 
  else
    res = []
    sources.each do |name|
      s = Source.load(name,{:app_id => APP_NAME,:user_id => '*'})
      if s.partition_type and s.partition_type == params[:partition_type].to_sym
        res << name 
      end
    end  
    res.to_json
  end  
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rhoconnect-3.1.2 lib/rhoconnect/api/source/list_sources.rb
rhoconnect-3.1.1 lib/rhoconnect/api/source/list_sources.rb
rhoconnect-3.1.0 lib/rhoconnect/api/source/list_sources.rb
rhoconnect-3.1.0.beta2 lib/rhoconnect/api/source/list_sources.rb
rhoconnect-3.1.0.beta1 lib/rhoconnect/api/source/list_sources.rb
rhoconnect-3.0.6 lib/rhoconnect/api/source/list_sources.rb
rhoconnect-3.0.5 lib/rhoconnect/api/source/list_sources.rb
rhoconnect-3.0.4 lib/rhoconnect/api/source/list_sources.rb
rhoconnect-3.0.3 lib/rhoconnect/api/source/list_sources.rb
rhoconnect-3.0.2 lib/rhoconnect/api/source/list_sources.rb
rhoconnect-3.0.1 lib/rhoconnect/api/source/list_sources.rb
rhoconnect-3.0.0 lib/rhoconnect/api/source/list_sources.rb
rhoconnect-3.0.0.rc1 lib/rhoconnect/api/source/list_sources.rb
rhoconnect-3.0.0.beta3 lib/rhoconnect/api/source/list_sources.rb
rhoconnect-3.0.0.beta1 lib/rhoconnect/api/source/list_sources.rb