diff options
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/TfL.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/TfL.pm b/perllib/FixMyStreet/Cobrand/TfL.pm index 6dec98b26..78711d345 100644 --- a/perllib/FixMyStreet/Cobrand/TfL.pm +++ b/perllib/FixMyStreet/Cobrand/TfL.pm @@ -61,4 +61,18 @@ sub categories_restriction { return $rs->search( { 'body.name' => 'TfL' } ); } +sub lookup_by_ref_regex { + return qr/^\s*((?:FMS\s*)?\d+)\s*$/i; +} + +sub lookup_by_ref { + my ($self, $ref) = @_; + + if ( $ref =~ s/^\s*FMS\s*//i ) { + return { 'id' => $ref }; + } + + return 0; +} + 1; |