mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-11 06:17:27 +02:00
sig private view fix
This commit is contained in:
parent
95d890e188
commit
b959c0b2c0
6 changed files with 17 additions and 9 deletions
|
@ -1029,8 +1029,8 @@ sub booking_update(){
|
|||
bike => "$bike",
|
||||
state => "",
|
||||
lock_state => "",
|
||||
station_lock_state => "",
|
||||
co2saving => "",
|
||||
#station_lock_state => "",
|
||||
#co2saving => "",
|
||||
response_state => "OK 1017: No update",
|
||||
response_text => "Der Mietstatus wurde nicht geändert.",
|
||||
};
|
||||
|
|
|
@ -158,6 +158,13 @@ sub sig_booking_update {
|
|||
$q->param(-name=>'state',-value=>"available");
|
||||
$q->param(-name=>'lock_state',-value=>"locked");
|
||||
($rows, $booking_values) = $apif->booking_update($q,\%varenv,$authraw,$aowner,$sig_book) if($authraw->{c_id});
|
||||
|
||||
#response is for sig json after rental-end
|
||||
delete $booking_values->{geo_distance};
|
||||
delete $booking_values->{response_state};
|
||||
delete $booking_values->{response_text};
|
||||
$booking_values->{bikeId} = $sig_book->{bikeId};
|
||||
$booking_values->{rentalId} = $sig_book->{rentalId};
|
||||
$response = {%$response, %$booking_values};
|
||||
}else{
|
||||
$response->{response_state} = "Failure: there is no rental with rentalID=$rentalId";
|
||||
|
|
|
@ -105,7 +105,7 @@ sub sig_available {
|
|||
|
||||
#station (mainly using sigojson site object)
|
||||
my $station = "SX$resp->{site}->{id}";
|
||||
if($station && looks_like_number($resp->{site}->{id})){
|
||||
if($station && looks_like_number($resp->{site}->{id}) && ref($bike_group) eq "ARRAY" && @{$bike_group}[0]){
|
||||
print FILE "Station: $station\n";
|
||||
$response_out->{$station}->{station} = "$station";
|
||||
$response_out->{$station}->{authed} = "$authed";
|
||||
|
@ -165,7 +165,7 @@ sub sig_available {
|
|||
$bike_id =~ s/S[1-9]X/SX/;
|
||||
$bike_id = $1 if($bike_id =~ /(\d+)/);
|
||||
|
||||
if($bike && looks_like_number($bike_id) && looks_like_number($resp->{site}->{id})){
|
||||
if($bike && looks_like_number($bike_id) && looks_like_number($resp->{site}->{id}) && ref($bike_group) eq "ARRAY" && @{$bike_group}[0]){
|
||||
print FILE "Bike: $bike\n";
|
||||
$response_out->{$bike}->{bike} = "$bike";
|
||||
$response_out->{$bike}->{authed} = "$authed";
|
||||
|
|
|
@ -831,7 +831,7 @@ sub sigbike_cupdate {
|
|||
owner => "169",
|
||||
};
|
||||
|
||||
$bw->log("UPDATE content from record_sig with bike nr:",$update,"");
|
||||
$bw->log("sigbike_cupdate content from record_sig with bike nr:",$update,"");
|
||||
$rows = $dbt->update_record($dbh,$update,$record_sig->{$bid});
|
||||
if($rows != 1){
|
||||
my $c_id = "";
|
||||
|
@ -862,7 +862,7 @@ sub sigstation_cupdate {
|
|||
owner => "169",
|
||||
};
|
||||
|
||||
$bw->log("UPDATE content from record_sig with bike nr:",$update,"");
|
||||
$bw->log("sigstation_cupdate content from record_sig with bike nr:",$update,"");
|
||||
$rows = $dbt->update_record($dbh,$update,$record_sig->{$sid});
|
||||
if($rows != 1){
|
||||
my $c_id = "";
|
||||
|
|
|
@ -188,6 +188,7 @@ print $q->div({-class=>"content2_legende"}, $q->img({-style=>'height:37px;', -sr
|
|||
|
||||
print "$initMap|$varenv->{dbname}|$api_return->{authcookie}|$users_sharee->{c_id}" if($users_dms->{u_id} == $dbt->{copri_conf}->{superu_id});
|
||||
|
||||
#print "$uri_request/GBFSout?request=stations_available&authcookie=$api_return->{authcookie}";
|
||||
|
||||
}
|
||||
1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue