| Line 960... |
Line 960... |
| 960 |
|
960 |
|
| 961 |
if ($change eq "add" or $change eq "override") {
|
961 |
if ($change eq "add" or $change eq "override") {
|
| Line 962... |
Line 962... |
| 962 |
my ($classid) = $dbh->selectrow_array ("select wrstbnd_id from class where id = ?", undef, $shift_id);
|
962 |
my ($classid) = $dbh->selectrow_array ("select wrstbnd_id from class where id = ?", undef, $shift_id);
|
| 963 |
|
963 |
|
| 964 |
my $body = {
|
964 |
my $body = {
|
| 965 |
"eventId" => "event_Y5567UWwS5",
|
965 |
"eventId" => "event_893C6u5olU",
|
| 966 |
"activeStatus" => "active",
|
966 |
"activeStatus" => "active",
|
| 967 |
"ticketTypeId" => $classid
|
967 |
"ticketTypeId" => $classid
|
| Line 975... |
Line 975... |
| 975 |
);
|
975 |
);
|
| 976 |
my $response = from_json($client->responseContent());
|
976 |
my $response = from_json($client->responseContent());
|
| Line 977... |
Line 977... |
| 977 |
|
977 |
|
| Line 978... |
Line 978... |
| 978 |
my $activationCode = $response->{activationCode};
|
978 |
my $activationCode = $response->{activationCode};
|
| 979 |
|
979 |
|
| 980 |
# 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'`;
|
980 |
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 981... |
Line 981... |
| 981 |
# my $add_response = $add_response[$#add_response];
|
981 |
my $add_response = $add_response[$#add_response];
|
| Line 982... |
Line 982... |
| 982 |
# chomp $add_response;
|
982 |
chomp $add_response;
|
| 983 |
|
983 |
|
| 984 |
# $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";
|
984 |
$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";
|
| 985 |
|
985 |
|