Skip to content
This repository was archived by the owner on Mar 7, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/dashing/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down