aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/My.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/My.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/My.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/My.pm b/perllib/FixMyStreet/App/Controller/My.pm
index 77711f807..0eb1ad3f1 100644
--- a/perllib/FixMyStreet/App/Controller/My.pm
+++ b/perllib/FixMyStreet/App/Controller/My.pm
@@ -205,6 +205,20 @@ sub planned_change : Path('planned/change') {
}
}
+sub shortlist_multiple : Path('planned/change_multiple') {
+ my ($self, $c) = @_;
+ $c->forward('/auth/check_csrf_token');
+
+ my @ids = $c->get_param_list('ids[]');
+
+ foreach my $id (@ids) {
+ $c->forward( '/report/load_problem_or_display_error', [ $id ] );
+ $c->user->add_to_planned_reports($c->stash->{problem});
+ }
+
+ $c->res->body(encode_json({ outcome => 'add' }));
+}
+
sub by_shortlisted {
my $a_order = $a->get_extra_metadata('order') || 0;
my $b_order = $b->get_extra_metadata('order') || 0;