mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-26 13:10:35 +00:00
fix bug for PUT and POST attributwes of serviceprocessor object in RESTAPI
This commit is contained in:
@@ -1886,13 +1886,14 @@ sub actionhdl {
|
||||
} elsif ($params->{'resourcename'} eq "serviceprocessor") {
|
||||
if (isGET()) {
|
||||
push @args, $urilayers[3];
|
||||
} elsif ($paramhash->{'value'}) {
|
||||
push @args, $urilayers[3]."=".$paramhash->{'value'};
|
||||
}
|
||||
if ((isPut() or isPost()) and defined($urilayers[3])) {
|
||||
foreach my $key (keys %$paramhash) {
|
||||
if (($key ne '') and (exists($paramhash->{$key}))) {
|
||||
push @args, $key."=".$paramhash->{$key};
|
||||
} elsif (isPut() or isPost()) {
|
||||
if ($paramhash->{'value'} and defined($urilayers[3])) {
|
||||
push @args, $urilayers[3]."=".$paramhash->{'value'};
|
||||
} else {
|
||||
foreach my $key (keys %$paramhash) {
|
||||
if (($key ne '') and (exists($paramhash->{$key}))) {
|
||||
push @args, $key."=".$paramhash->{$key};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user