From c5af2fec5bfbff8469ecf770dbd67718b8fc9c78 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Tue, 13 Aug 2024 23:05:34 +0200 Subject: DBDB: sort wagenreihung dict keys so that caching actually works --- lib/Travelynx/Helper/DBDB.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Travelynx/Helper/DBDB.pm') diff --git a/lib/Travelynx/Helper/DBDB.pm b/lib/Travelynx/Helper/DBDB.pm index 10b9136..20bcbca 100644 --- a/lib/Travelynx/Helper/DBDB.pm +++ b/lib/Travelynx/Helper/DBDB.pm @@ -42,7 +42,7 @@ sub has_wagonorder_p { my $url = sprintf( '%s?%s', 'https://www.bahn.de/web/api/reisebegleitung/wagenreihung/vehicle-sequence', - join( '&', map { $_ . '=' . $param{$_} } keys %param ) ); + join( '&', map { $_ . '=' . $param{$_} } sort keys %param ) ); my $cache = $self->{realtime_cache}; my $promise = Mojo::Promise->new; @@ -107,7 +107,7 @@ sub get_wagonorder_p { my $url = sprintf( '%s?%s', 'https://www.bahn.de/web/api/reisebegleitung/wagenreihung/vehicle-sequence', - join( '&', map { $_ . '=' . $param{$_} } keys %param ) ); + join( '&', map { $_ . '=' . $param{$_} } sort keys %param ) ); my $debug_prefix = "get_wagonorder_p($opt{train_type} $opt{train_no} @ $opt{eva})"; -- cgit v1.2.3