diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-05-29 14:37:07 +0100 |
---|---|---|
committer | M Somerville <matthew-github@dracos.co.uk> | 2020-09-02 14:52:54 +0100 |
commit | 36401150f6ea0775f3c70a30ef871ffd6defa94b (patch) | |
tree | e6e341a19cc3bb12121789abc89d020acee6d81e /perllib/FixMyStreet/App/Controller/Report/New.pm | |
parent | 4f96bd558e0b915adef325f27ac5ccd65e9b310f (diff) |
[Hounslow] Factor non-map report creation calls.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/New.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index f5933d754..a00251171 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -1785,6 +1785,24 @@ sub generate_category_extra_json : Private { return \@fields; } +sub non_map_creation : Private { + my ($self, $c, $extras) = @_; + + $c->forward('initialize_report'); + $c->forward('check_for_category'); + $c->forward('/auth/check_csrf_token'); + $c->forward('process_report'); + $c->forward('process_user'); + if ($extras) { + $c->forward($_) for @$extras; + } + $c->forward('/photo/process_photo'); + return 0 unless $c->forward('check_for_errors'); + $c->forward('save_user_and_report'); + return 1; + +} + __PACKAGE__->meta->make_immutable; 1; |