examples/csv_export/app.rb in liftapp-client-0.0.2 vs examples/csv_export/app.rb in liftapp-client-0.0.3

- old
+ new

@@ -1,6 +1,7 @@ require 'sinatra' +require 'haml' require 'coffee-script' require 'liftapp-client' configure do mime_type :plain, 'text/plain' @@ -18,11 +19,11 @@ get '/checkins/:user/:habit' do content_type :plain client = Liftapp::Client.new(profile_hash: params[:user]) data = client.checkin_data(params[:habit]) - output = data[:checkins].map { |d| d.strftime('%Y-%m-%d') } - output.unshift data[:'habit-name'] + output = data['checkins'].map { |d| d.strftime('%Y-%m-%d') } + output.unshift data['habit-name'] output.join("\n") end get '/application.js' do coffee :application