Created test and fixed things

Still needs to spit out timezone on the datetime
This commit is contained in:
Finn 2017-09-05 17:24:04 +01:00
parent 06858fc005
commit 4e7c8bbfae
2 changed files with 74 additions and 2 deletions

View file

@ -29,13 +29,16 @@ sub post_transaction_list_purchases {
order_by => { -desc => 'purchase_time' },
},
);
# purchase_time needs timezone attached to it
my @transaction_list = (
map {{
seller => $_->entity->name,
seller => $_->seller->name,
value => $_->value,
purchase_time => $_->purchase_time,
}} $transactions->all
)
);
return $c->render( json => {
success => Mojo::JSON->true,
transactions => \@transaction_list,