Skip to content

Commit

Permalink
Enable JSON during processing_votes phase (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfabulich authored Oct 17, 2024
1 parent 98b491d commit 13c9fee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion IFComp/lib/IFComp/Controller/Comp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ sub json : Chained('fetch_comp') : PathPart('json') : Args(0) {
my $comp = $c->stash->{comp};

if ( $comp->status ne 'open_for_judging'
&& $comp->status ne 'processing_votes'
&& $comp->status ne 'over' )
{
$c->detach('/error_403');
Expand All @@ -145,7 +146,9 @@ sub json : Chained('fetch_comp') : PathPart('json') : Args(0) {
$c->response->content_type("application/json");
my $j = JSON::Any->new;
my @data;
if ( $comp->status eq 'open_for_judging' ) {
if ( $comp->status eq 'open_for_judging'
|| $comp->status eq 'processing_votes' )
{
@data = map {
{ "id" => $_->id,
"title" => $_->title,
Expand Down

0 comments on commit 13c9fee

Please sign in to comment.