From: Marius Gavrilescu Date: Sun, 25 Jan 2015 20:23:31 +0000 (+0200) Subject: Pass query parameters to response X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=39e2d01af11ba6679478c9d2b265e76929a67191;p=gruntmaster-page.git Pass query parameters to response --- diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index efcedf5..7f9c21f 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -79,6 +79,7 @@ sub response { $title = 'No title'; } $params->{time} = time; + $params->{args} = {%_}; bless {template => $template, title => $title, params => $params, maxage => ($maxage // 1)}, __PACKAGE__.'::Response' } @@ -164,7 +165,7 @@ sub dispatch_request{ sub (/ct/ + ?:owner~) { response ct => 'Contests', db->contest_list(%_) }, sub (/log/ + ?:contest~&:owner~&:page~&:problem~&:private~) { forbid $_{private}; - response log => 'Job list', {%{db->job_list(%_)}, maybe contest => $_{contest}} + response log => 'Job list', {%{db->job_list(%_)}, maybe contest => $_{contest},} }, sub (/pb/ + ?:owner~&:contest~&:private~) { forbid $_{private};