aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2016-08-01 12:03:45 +0100
committerDave Arter <davea@mysociety.org>2016-08-01 12:03:45 +0100
commit1af9684e54aedb7f9935cdc4d38a28c61ec7d1f5 (patch)
treed6b044f54e070f8dbf265083534e849eb9ad6ead /perllib/FixMyStreet/App/Controller/Report.pm
parent14aaf6fafaa9aa8736f49851e95fa2c3c566c056 (diff)
parent27e0c74321f48f9997745bf00647e3958f34d8e2 (diff)
Merge branch '1281-html-emails'
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;