Subversion Repositories VORC

Rev

Rev 177 | Rev 180 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 177 Rev 178
Line 940... Line 940...
940
    );
940
    );
941
    my $response = from_json($client->responseContent());
941
    my $response = from_json($client->responseContent());
Line 942... Line 942...
942
 
942
 
Line 943... Line 943...
943
    my $activationCode = $response->{activationCode};
943
    my $activationCode = $response->{activationCode};
-
 
944
    
-
 
945
    my @add_response = `/bin/curl --location --request POST 'https://core.wrstbnd.io/rest/core/v1/assign' --header 'Authorization: 601037851507c624' --form accountid=$accountid --form ticketactcode=$activationCode --output /dev/null --silent --write-out '%{http_code}\n'`;
Line 944... Line 946...
944
    
946
    my $add_response = $add_response[$#add_response];
Line 945... Line 947...
945
    my $add_response = `/bin/curl --no-progress-meter -i --location 'https://core.wrstbnd.io/rest/core/v1/assign' --header 'Authorization: 601037851507c624' --form 'accountid="$accountid"' --form 'ticketactcode="$activationCode"' | /bin/grep HTTP | /bin/cut -d' ' -f2`;
947
    chomp $add_response;
946
    
948
    
947
    $dbh->do ("update assignment set wb_ticket_act = ? where Gid = ? and RCid = ? and role like ?", undef, $activationCode, $shift_id, $user_id, 'CLA-%');
949
    $dbh->do ("update assignment set wb_ticket_act = ? where Gid = ? and RCid = ? and role like ?", undef, $activationCode, $shift_id, $user_id, 'CLA-%') unless $add_response ne "200";
948
    
950
    
949
    return;
951
    return;
Line 950... Line 952...
950
  } elsif ($change eq "del") {
952
  } elsif ($change eq "del") {
Line 951... Line 953...
951
    my $activationCode = $wb_act_code;
953
    my $activationCode = $wb_act_code;