]> iEval git - plack-app-gruntmaster.git/commitdiff
Pass query parameters to response
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 25 Jan 2015 20:23:31 +0000 (22:23 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 25 Jan 2015 20:23:31 +0000 (22:23 +0200)
lib/Plack/App/Gruntmaster.pm

index efcedf54a23e74f79fae336dfa64733b020df16d..7f9c21f4803c61f6bf46adf9bd3363065e5d1c33 100644 (file)
@@ -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};
This page took 0.029915 seconds and 4 git commands to generate.