From 75aa4a961a003450063befaa7e08bf6727c597cb Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 19 Jun 2019 21:08:35 +0200 Subject: disable wagonorder for now (not used yet anyway) --- lib/Travelynx.pm | 57 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) (limited to 'lib') diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 4a94b02..27ccd62 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -1805,15 +1805,15 @@ sub startup { $extra_data->{him_msg} = $traininfo2->{messages}; - my $res = $db->select( 'in_transit', ['data'], - { user_id => $uid } ); - my $res_h = $res->expand->hash; - if ( $res_h - and $res_h->{data} - and $res_h->{data}{wagonorder} ) - { - $extra_data->{wagonorder} = $res_h->{data}{wagonorder}; - } + #my $res = $db->select( 'in_transit', ['data'], + # { user_id => $uid } ); + #my $res_h = $res->expand->hash; + #if ( $res_h + # and $res_h->{data} + # and $res_h->{data}{wagonorder} ) + #{ + # $extra_data->{wagonorder} = $res_h->{data}{wagonorder}; + #} return $db->update_p( 'in_transit', @@ -1824,26 +1824,27 @@ sub startup { { user_id => $uid } ); } - )->then( - sub { - if ($is_departure) { - return $self->get_wagonorder_p( $train->sched_departure, - $train->train_no ); - } - return Mojo::Promise->reject; - } - )->then( - sub { - my ($wagonorder) = @_; - - $extra_data->{wagonorder} = $wagonorder; - $db->update( - 'in_transit', - { data => JSON->new->encode($extra_data) }, - { user_id => $uid } - ); - } + #)->then( + # sub { + # if ($is_departure) { + # return $self->get_wagonorder_p( $train->sched_departure, + # $train->train_no ); + # } + # return Mojo::Promise->reject; + # } + #)->then( + # sub { + # my ($wagonorder) = @_; + + # $extra_data->{wagonorder} = $wagonorder; + + # $db->update( + # 'in_transit', + # { data => JSON->new->encode($extra_data) }, + # { user_id => $uid } + # ); + # } )->wait; } ); -- cgit v1.2.3