From 1151b44ee34358473031e19bba6400891ca2b5c6 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Fri, 24 Nov 2017 16:12:18 +0100 Subject: [PATCH] format --- credger.cr | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/credger.cr b/credger.cr index 7dd482b..e666bd2 100644 --- a/credger.cr +++ b/credger.cr @@ -35,9 +35,7 @@ end get "/api/ledger/balance" do |env| env.response.content_type = "application/json" - cleared = env.params.query.has_key?( "cleared" ) ? env.params.query[ "cleared" ] == "true" : false - - ledger.balance( cleared, + ledger.balance( env.params.query.has_key?( "cleared" ) ? env.params.query[ "cleared" ] == "true" : false, env.params.query[ "depth" ].to_i, env.params.query[ "period" ], env.params.query[ "categories" ] ) @@ -47,7 +45,8 @@ end get "/api/ledger/graph_values" do |env| env.response.content_type = "application/json" - ledger.graph_values( env.params.query["period"], env.params.query["categories"].split(" ") ).to_json + ledger.graph_values( env.params.query["period"], + env.params.query["categories"].split(" ") ).to_json end get "/api/ledger/register" do |env|