Permalink
Browse files

Merge pull request #33 from shibayu36/fix-sort

sortやめる
  • Loading branch information...
hitode909 committed Sep 16, 2018
2 parents 5900e46 + 4f4d0b5 commit f559848d3e4725aa7d39de82c1ebbcc7172a3a4c
Showing with 1 addition and 2 deletions.
  1. +1 −2 webapp/perl/lib/Torb/Web.pm
@@ -576,12 +576,11 @@ get '/admin/api/reports/sales' => [qw/admin_login_required/] => sub {
sub render_report_csv {
my ($self, $c, $reports) = @_;
my @reports = sort { $a->{sold_at} cmp $b->{sold_at} } @$reports;
my @keys = qw/reservation_id event_id rank num price user_id sold_at canceled_at/;
my $body = join ',', @keys;
$body .= "\n";
for my $report (@reports) {
for my $report (@$reports) {
$body .= join ',', @{$report}{@keys};
$body .= "\n";
}

0 comments on commit f559848

Please sign in to comment.