Sha256: 432b6a925026b1b159d2ee9984c6835d33fa36b26d9032f5901e6c489260c991

Contents?: true

Size: 730 Bytes

Versions: 1

Compression:

Stored size: 730 Bytes

Contents

# require 'broker/import'
# require 'broker/export'

module Broker
  module WebRoutes
    def self.registered(app)
      app.get "/" do
        erb :index
      end
    
      app.get '/imports' do 
        erb :imports
      end
    
      app.get '/exports' do
        # db = params['table']
#         app = params['app']
#         @fields = []
#         @header = "Exports"
#         if db && app
#           qb = Broker::Export.new(:app => app)
#           @fields = qb.get_field_names(db)
#           @header = "App: #{app.downcase} | Table: #{db.capitalize}"
#           qb.sign_out
#         end
        @fields = []
        erb :exports
      end
      
      app.get '/api' do
        erb :api
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
broker-0.1.2 lib/broker/web_routes.rb