This commit is contained in:
garnier-quentin 2019-05-28 15:40:51 +02:00
parent f70d5f6703
commit 17f1339571
1 changed files with 3 additions and 4 deletions

View File

@ -195,9 +195,8 @@ sub request_api {
); );
# Some content may be strangely returned, for example : "[{\"Category\":\"provider\",\"Count\":1}]" # Some content may be strangely returned, for example : "[{\"Category\":\"provider\",\"Count\":1}]"
if ($content =~ /^"(\[.*\])"$/) { if (defined($options{eval_content}) && $options{eval_content} == 1) {
$content = $1; $content = eval "$content";
$content =~ s/\\"/"/g;
} }
my $decoded; my $decoded;
@ -249,7 +248,7 @@ sub api_system_status {
sub internal_update_checker { sub internal_update_checker {
my ($self, %options) = @_; my ($self, %options) = @_;
my $status = $self->request_api(method => 'GET', url_path =>'/api/UpdateChecker/GetFromParams'); my $status = $self->request_api(method => 'GET', url_path =>'/api/UpdateChecker/GetFromParams', eval_content => 1);
return $status; return $status;
} }