summaryrefslogtreecommitdiff
path: root/lib/Travel/Status
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-05-17 18:58:11 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-05-17 18:58:11 +0200
commitc6c70b66cd6c06aef1cf94e6723f5429297cea42 (patch)
treec8b8fe9549a87e60fa639f589a3962b3f434ccb2 /lib/Travel/Status
parentdfa79f5313d09c3e98f5b7e452e54aa77efd518a (diff)
Fix efa_url/service handling for new_p
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r--lib/Travel/Status/DE/EFA.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Travel/Status/DE/EFA.pm b/lib/Travel/Status/DE/EFA.pm
index b61acbc..b9ced2e 100644
--- a/lib/Travel/Status/DE/EFA.pm
+++ b/lib/Travel/Status/DE/EFA.pm
@@ -96,12 +96,12 @@ sub new_p {
$self->{promise} = $opt{promise};
- $self->{ua}->post_p( $opt{efa_url} => form => $self->{post} )->then(
+ $self->{ua}->post_p( $self->{efa_url} => form => $self->{post} )->then(
sub {
my ($tx) = @_;
if ( my $err = $tx->error ) {
$promise->reject(
-"POST $opt{efa_url} returned HTTP $err->{code} $err->{message}"
+"POST $self->{efa_url} returned HTTP $err->{code} $err->{message}"
);
return;
}
@@ -242,6 +242,8 @@ sub new {
useRealtime => '1',
},
developer_mode => $opt{developer_mode},
+ efa_url => $opt{efa_url},
+ service => $opt{service},
};
if ( $opt{place} ) {
@@ -271,7 +273,7 @@ sub new {
return $self;
}
- my $response = $self->{ua}->post( $opt{efa_url}, $self->{post} );
+ my $response = $self->{ua}->post( $self->{efa_url}, $self->{post} );
if ( $response->is_error ) {
$self->{errstr} = $response->status_line;