aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 89df4a52d..6ac3c8ea1 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -278,6 +278,17 @@ sub delete :Local :Args(1) {
return $c->res->redirect($uri);
}
+sub map : Path('') : Args(2) {
+ my ( $self, $c, $id, $map ) = @_;
+
+ $c->detach( '/page_error_404_not_found', [] ) unless $map eq 'map';
+ $c->forward( 'load_problem_or_display_error', [ $id ] );
+
+ my $image = $c->stash->{problem}->static_map;
+ $c->res->content_type($image->{content_type});
+ $c->res->body($image->{data});
+}
+
__PACKAGE__->meta->make_immutable;
1;