Class: Sentiero::Web::EventsApp
- Inherits:
-
Object
- Object
- Sentiero::Web::EventsApp
- Defined in:
- lib/sentiero/web/events_app.rb
Instance Method Summary collapse
Instance Method Details
#call(env) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/sentiero/web/events_app.rb', line 13 def call(env) method = env["REQUEST_METHOD"] case method when "POST" handle_post(env) when "OPTIONS" (env) else with_cors(env, [405, {"content-type" => "application/json"}, ['{"error":"method not allowed"}']]) end end |