summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller/Api.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx/Controller/Api.pm')
-rwxr-xr-xlib/Travelynx/Controller/Api.pm12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Travelynx/Controller/Api.pm b/lib/Travelynx/Controller/Api.pm
index 8d2d2a7..74260c4 100755
--- a/lib/Travelynx/Controller/Api.pm
+++ b/lib/Travelynx/Controller/Api.pm
@@ -264,8 +264,10 @@ sub travel_v1 {
uid => $uid
);
if ( $payload->{comment} and not $error ) {
- $self->update_in_transit_comment(
- sanitize( q{}, $payload->{comment} ), $uid );
+ $self->in_transit->update_user_data(
+ uid => $uid,
+ user_data => { comment => sanitize( q{}, $payload->{comment} ) }
+ );
}
if ( $to_station and not $error ) {
( $train, $error ) = $self->checkout(
@@ -310,8 +312,10 @@ sub travel_v1 {
}
if ( $payload->{comment} ) {
- $self->update_in_transit_comment(
- sanitize( q{}, $payload->{comment} ), $uid );
+ $self->in_transit->update_user_data(
+ uid => $uid,
+ user_data => { comment => sanitize( q{}, $payload->{comment} ) }
+ );
}
my ( $train, $error ) = $self->checkout(