class CPEE::Callbacks::DelCallback

Public Instance Methods

response() click to toggle source
# File lib/cpee/implementation_callbacks.rb, line 76
def response
  id = @a[0]
  opts = @a[1]
  callback = @r[-1]

  if CPEE::Persistence::extract_item(id,opts,"callback/#{callback}/type") == 'callback'
    CPEE::Message::send(
      :'callback-end',
      callback,
      opts[:url],
      id,
      {},
      {},
      {},
      opts[:redis]
    )
  elsif CPEE::Persistence::extract_item(id,opts,"callback/#{callback}/type") == 'vote'
    CPEE::Message::send(
      :'vote-response',
      callback,
      opts[:url],
      id,
      {},
      {},
      'true',
      opts[:redis]
    )
  else
    @status = 404
  end
  nil
end