]> iEval git - gruntmaster-page.git/blobdiff - lib/Plack/App/Gruntmaster.pm
Fix /pb/
[gruntmaster-page.git] / lib / Plack / App / Gruntmaster.pm
index 814c70ff273ac8108cf31fad3eb736323cd6d008..f32c606866244604e080ca7bfae792a4b4420d71 100644 (file)
@@ -107,18 +107,6 @@ sub dispatch_request{
                        [200, \@headers, [job->source]]
                },
 
-               sub (?:contest=) {
-                       return NOT_FOUND if !contest;
-                       forbid contest->is_pending;
-                       response_filter { return shift }
-               },
-
-               sub (?:problem=) {
-                       return NOT_FOUND if !problem;
-                       forbid problem->private;
-                       response_filter { return shift }
-               },
-
                sub (?:format~) {
                        my $format = lc ($_{format} // '');
                        response_filter {
@@ -159,12 +147,13 @@ sub dispatch_request{
 
                sub (/us/)                                        { response us => 'Users', {us => db->user_list} },
                sub (/ct/  + ?:owner~)                            { response ct => 'Contests', db->contest_list(%_) },
-               sub (/log/ + ?:contest~&:owner~&:page~&:problem~&:private~) {
+               sub (/log/ + ?:contest~&:owner~&:page~&:problem~&:private~&:result~) {
                        forbid $_{private};
                        response log => 'Job list', {%{db->job_list(%_)}, maybe contest => $_{contest},}
                },
                sub (/pb/  + ?:owner~&:contest~&:private~)                  {
                        forbid $_{private};
+                       forbid contest && contest->is_pending;
                        response pb => 'Problems', db->problem_list(%_)
                },
 
This page took 0.019225 seconds and 4 git commands to generate.