aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-06-22 17:20:10 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-07-06 12:23:14 +0100
commitc7dbb65e2d01e37f276af3db0372123366b3a1a1 (patch)
treecb4874cb87ea4c6a02a9004b29a86e21a7ef2382 /perllib/Open311.pm
parent64335826ec42217e1a9a98c0dbc1f13ec034ddb4 (diff)
Rewrite open311-update-reports to share code.
Make GetUpdates and GetServiceRequestUpdates share a common base; spot all visible states.
Diffstat (limited to 'perllib/Open311.pm')
-rw-r--r--perllib/Open311.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm
index 00e4bae9b..41cd0f1e0 100644
--- a/perllib/Open311.pm
+++ b/perllib/Open311.pm
@@ -14,6 +14,7 @@ use FixMyStreet::Cobrand;
use FixMyStreet::DB;
use Utils;
use Path::Tiny 'path';
+use FixMyStreet::App::Model::PhotoSet;
has jurisdiction => ( is => 'ro', isa => Str );;
has api_key => ( is => 'ro', isa => Str );
@@ -277,7 +278,8 @@ sub get_service_requests {
};
my $service_request_xml = $self->_get( $self->endpoints->{requests}, $params || undef );
- return $self->_get_xml_object( $service_request_xml );
+ my $requests = $self->_get_xml_object( $service_request_xml );
+ return $requests->{request};
}
sub get_service_request_id_from_token {