Class: Banacle::InteractiveMessage::Handler

Inherits:
Handler
  • Object
show all
Defined in:
lib/banacle/interactive_message/handler.rb

Instance Attribute Summary

Attributes inherited from Handler

#auth, #request

Instance Method Summary collapse

Methods inherited from Handler

#handle, #set_authenticator!

Instance Method Details

#handle_requestObject



8
9
10
11
12
13
14
15
# File 'lib/banacle/interactive_message/handler.rb', line 8

def handle_request
  unless authenticated?
    return Renderer.render_unauthenticated
  end

  command = Parser.parse(JSON.parse(request_payload))
  Renderer.render(request.params, command)
end