From 8ec32e3b3c173051434462d651772b77f10e03cd Mon Sep 17 00:00:00 2001 From: Finn Date: Wed, 17 Jan 2018 17:38:24 +0000 Subject: [PATCH] Changed logic for transaction list API --- lib/Pear/LocalLoop/Controller/Api/Categories.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Pear/LocalLoop/Controller/Api/Categories.pm b/lib/Pear/LocalLoop/Controller/Api/Categories.pm index 653b2e6..79751eb 100644 --- a/lib/Pear/LocalLoop/Controller/Api/Categories.pm +++ b/lib/Pear/LocalLoop/Controller/Api/Categories.pm @@ -9,8 +9,8 @@ sub post_category_list { my $entity = $c->stash->{api_user}->entity; my $duration = DateTime::Duration->new( days => 30 ); - my $end = DateTime->today; - my $start = $end->clone->subtract_duration( $duration ); + my $start = DateTime->today; + my $end = $start->clone->subtract_duration( $duration ); my $data = { days => [], category => [], value => [] };