Sha256: fdd2a3a91ca6811225ec5ecac505ad954233b788bdcc9ecf8c77b1e0457e99d0
Contents?: true
Size: 589 Bytes
Versions: 36
Compression:
Stored size: 589 Bytes
Contents
module Sinatra::FanforceHelpers require 'fanforce/api' def organization_id @organization_id = params[:organization_id] || ff.params[:organization_id] end def ff return @ff if @ff.present? @ff = Fanforce::API.new(params) #return @ff if !@ff.valid_fanforce_request? and !@ff.valid_fanforce_js_request? @ff.auth Sinatra::FanforceHelpers.find_api_key(ff.params[:organization_id]) @ff end def self.find_api_key(organization_id, addon_type=:app, addon_id=FanforceApp._id) $Redis.get("installed:#{addon_type}-#{addon_id}:#{organization_id}") end end
Version data entries
36 entries across 36 versions & 1 rubygems