Commit a8a20647 authored by Dietmar Maurer's avatar Dietmar Maurer

use new get_result_changes()

That way we can return file diffs as additional return attribute.
parent af05769e
...@@ -157,6 +157,10 @@ sub prepare_response_data { ...@@ -157,6 +157,10 @@ sub prepare_response_data {
$new->{total} = $res->{total}; $new->{total} = $res->{total};
} }
if ($success && $res->{changes}) {
$new->{changes} = $res->{changes};
}
$res->{data} = $new; $res->{data} = $new;
} }
...@@ -291,7 +295,6 @@ sub rest_handler { ...@@ -291,7 +295,6 @@ sub rest_handler {
# set environment variables # set environment variables
$rpcenv->set_language('C'); # fixme: $rpcenv->set_language('C'); # fixme:
$rpcenv->set_client_ip($clientip); $rpcenv->set_client_ip($clientip);
$rpcenv->set_result_count(undef);
my $euid = $>; my $euid = $>;
...@@ -426,6 +429,9 @@ sub rest_handler { ...@@ -426,6 +429,9 @@ sub rest_handler {
if (my $count = $rpcenv->get_result_count()) { if (my $count = $rpcenv->get_result_count()) {
$resp->{total} = $count; $resp->{total} = $count;
} }
if (my $diff = $rpcenv->get_result_changes()) {
$resp->{changes} = $diff;
}
}; };
my $err = $@; my $err = $@;
if ($err) { if ($err) {
......
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