mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-07-12 00:16:26 +02:00
sig unlock init
This commit is contained in:
parent
ec95e0db06
commit
fa6181eaa4
5 changed files with 67 additions and 15 deletions
|
@ -71,6 +71,12 @@ $ctpos = $dbt->fetch_tablerecord($dbh,$posref) if($user_id =~ /^\d+$/ && $user_i
|
|||
|
||||
print FILE "fetched from DB ctadr:$ctadr->{c_id}|ctpos:$ctpos->{c_id}\n";
|
||||
|
||||
#sig => copri key mapping
|
||||
#bike id => txt22
|
||||
#reservationId => txt10
|
||||
#renatlId => txt11
|
||||
|
||||
|
||||
#only for tests
|
||||
if($todo eq "stations_available"){
|
||||
$q->param(-name=>'request',-value=>"stations_available");
|
||||
|
@ -87,11 +93,6 @@ if($todo eq "bikes_available"){
|
|||
#print $0 . Dumper($return) . "\n";
|
||||
}
|
||||
|
||||
#sig => copri key mapping
|
||||
#bike id => txt22
|
||||
#reservationId => txt10
|
||||
#renatlId => txt11
|
||||
|
||||
#only for tests. build in methode
|
||||
elsif($todo eq "reserve"){
|
||||
#$ctadr = { c_id => 1842 };
|
||||
|
@ -108,6 +109,14 @@ elsif($todo eq "rental" && $ctadr->{c_id} > 0){
|
|||
#print $0 . Dumper($return) . "\n";
|
||||
}
|
||||
|
||||
#live! Fork unlock by lock_state=unlocking request with bike "id"
|
||||
elsif($todo eq "unlock" && $ctadr->{c_id} > 0){
|
||||
#$ctadr = { c_id => 1842 };
|
||||
#$ct_bike = { txt22 => "380116b5-0522-43da-ab66-477744a731a3" };
|
||||
my $return = $si->sig_unlock(\%varenv,$todo,$ctadr,$ct_bike,$ctpos);
|
||||
#print $0 . Dumper($return) . "\n";
|
||||
}
|
||||
|
||||
#live! Fork rental_end request with "rentalId"
|
||||
elsif($todo eq "rental_end" && $ctadr->{c_id} > 0 && $ctpos->{txt11}){
|
||||
my $return = $si->sig_booking(\%varenv,$todo,$ctadr,$ct_bike,$ctpos);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue