]> iEval git - plack-app-gruntmaster.git/blobdiff - lib/Plack/App/Gruntmaster.pm
Merge branch 'master' into newmc
[plack-app-gruntmaster.git] / lib / Plack / App / Gruntmaster.pm
index 40879a98e9ac87f26d381063bb64fddd059159c7..80bcc1a9c130563aacdce3ac9b72aaade7d33d6b 100644 (file)
@@ -124,7 +124,7 @@ sub dispatch_request{
                        my $private = job->private || job->problem->private || job->contest && job->contest->is_running;
                        forbid !$isowner && $private;
                        my $privacy = $private ? 'private' : 'public';
-                       my @headers = ('X-Forever' => 1, 'Cache-Control' => "$privacy, max-age=604800", 'Content-Type' => CONTENT_TYPES->{job->format});
+                       my @headers = ('X-Forever' => 1, 'Cache-Control' => "$privacy, max-age=604800", 'Content-Type' => CONTENT_TYPES->{job->extension});
                        push @headers, (Vary => 'Authorization') if $private;
                        [200, \@headers, [job->source]]
                },
@@ -166,7 +166,8 @@ sub dispatch_request{
 
                sub (/ed/:contest) {
                        forbid contest->is_running;
-                       response ed => 'Editorial of ' . contest->name, db->problem_list(contest => $_{contest}, solution => 1);
+                       my $pblist = db->problem_list(contest => $_{contest}, solution => 1);
+                       response ed => 'Editorial of ' . contest->name, {%$pblist, editorial => contest->editorial};
                },
 
                sub (/login) {
This page took 0.027378 seconds and 4 git commands to generate.