diff options
Diffstat (limited to 'perllib/FixMyStreet/SendReport/EastHants.pm')
-rw-r--r-- | perllib/FixMyStreet/SendReport/EastHants.pm | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/perllib/FixMyStreet/SendReport/EastHants.pm b/perllib/FixMyStreet/SendReport/EastHants.pm index 0e9944b18..aa290742e 100644 --- a/perllib/FixMyStreet/SendReport/EastHants.pm +++ b/perllib/FixMyStreet/SendReport/EastHants.pm @@ -1,25 +1,15 @@ package FixMyStreet::SendReport::Email; +use Moose; +use namespace::autoclean; + +BEGIN { extends 'FixMyStreet::SendReport'; } + use Error qw(:try); use Encode; use mySociety::Web qw(ent); use EastHantsWSDL; -my %councils = (); -my @to; - -sub reset { - %councils = (); - @to = (); -} - -sub add_council { - my $council = shift; - my $name = shift; - - $councils{ $council } = $name; -} - sub construct_message { my %h = @_; my $message = ''; @@ -44,6 +34,9 @@ sub send { my ( $row, $h, $to, $template, $recips, $nomail ) = @_; + # FIXME: should not recreate this each time + my $eh_service; + $h->{category} = 'Customer Services' if $h->{category} eq 'Other'; $h->{message} = construct_message( %$h ); my $return = 1; |