Skip to content

Commit

Permalink
fixup! Redirect to confirmation message after POST when making report
Browse files Browse the repository at this point in the history
remove debugging output
  • Loading branch information
davea committed Feb 5, 2024
1 parent ee87a38 commit fefada8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions perllib/FixMyStreet/App/Controller/Report.pm
Original file line number Diff line number Diff line change
Expand Up @@ -666,14 +666,12 @@ sub confirmation : Path('confirmation') : Args(1) {
# First of all check that the report ID is valid
my $report = FixMyStreet::DB->resultset('Problem')->find( { id => $id } );
unless ( $report ) {
warn "DEBUG report ID $id is invalid";
$c->detach( '/page_error_404_not_found', [] );

Check warning on line 669 in perllib/FixMyStreet/App/Controller/Report.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/App/Controller/Report.pm#L669

Added line #L669 was not covered by tests
}

# Now verify the token we've been given is correct
my $token_param = $c->get_param('token') || "";
unless ( $token_param eq $report->confirmation_token ) {
warn "DEBUG token doesn't match - got $token_param but expected " . $report->confirmation_token;
$c->detach( '/page_error_404_not_found', [] );
}

Expand All @@ -687,7 +685,6 @@ sub confirmation : Path('confirmation') : Args(1) {
# cobrand but sent to district) so get the full URL where we're sure it
# can be viewed.
my $base = $c->cobrand->relative_url_for_report( $report );
warn "DEBUG timestamp is $timestamp, cutoff is $cutoff, redirecting to report on $base";
return $c->res->redirect($base . $report->url);
}

Expand Down

0 comments on commit fefada8

Please sign in to comment.