lib/flapjack/gateways/api/contact_methods.rb in flapjack-0.7.35 vs lib/flapjack/gateways/api/contact_methods.rb in flapjack-0.8.0

- old
+ new

@@ -116,11 +116,10 @@ # Lists this contact's notification rules # https://github.com/flpjck/flapjack/wiki/API#wiki-get_contacts_id_notification_rules app.get '/contacts/:contact_id/notification_rules' do content_type :json - contact = find_contact(params[:contact_id]) - contact.notification_rules.to_json + "[" + find_contact(params[:contact_id]).notification_rules.map {|r| r.to_json }.join(',') + "]" end # Get the specified notification rule for this user # https://github.com/flpjck/flapjack/wiki/API#wiki-get_contacts_id_notification_rules_id app.get '/notification_rules/:id' do