Commit d238821a authored by Dietmar Maurer's avatar Dietmar Maurer

correctly print string return values

parent 9361ee7b
......@@ -224,8 +224,16 @@ sub call_method {
warn "200 OK\n"; # always print OK status if successful
return if $info && $info->{returns} &&
$info->{returns}->{type} && $info->{returns}->{type} eq 'null';
if ($info && $info->{returns} && $info->{returns}->{type}) {
my $rtype = $info->{returns}->{type};
return if $rtype eq 'null';
if ($rtype eq 'string') {
print $data;
return $data;
}
}
print to_json($data, {allow_nonref => 1, canonical => 1, pretty => 1 });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment