diff --git a/lib/dashing/app.rb b/lib/dashing/app.rb index 0e7f7bb6..c7faf4df 100644 --- a/lib/dashing/app.rb +++ b/lib/dashing/app.rb @@ -102,6 +102,9 @@ def protected! post '/widgets/:id' do request.body.rewind body = JSON.parse(request.body.read) + if body.is_a?(Array) + body = {:data => body} + end auth_token = body.delete("auth_token") if !settings.auth_token || settings.auth_token == auth_token send_event(params['id'], body)