Commit c92330fd authored by Paul Asmuth's avatar Paul Asmuth
Browse files

core: allow POST with JSON body to /events

parent af8b092f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ class FnordMetric::App < Sinatra::Base
  end

  post '/events' do
    params = JSON.parse(request.body.read) unless params
    halt 400, 'please specify the event_type (_type)' unless params["_type"]
    track_event((8**32).to_s(36), parse_params(params))
  end