use new get_result_changes()
That way we can return file diffs as additional return attribute.
This commit is contained in:
parent
af05769e85
commit
a8a20647ac
@ -157,6 +157,10 @@ sub prepare_response_data {
|
||||
$new->{total} = $res->{total};
|
||||
}
|
||||
|
||||
if ($success && $res->{changes}) {
|
||||
$new->{changes} = $res->{changes};
|
||||
}
|
||||
|
||||
$res->{data} = $new;
|
||||
}
|
||||
|
||||
@ -291,7 +295,6 @@ sub rest_handler {
|
||||
# set environment variables
|
||||
$rpcenv->set_language('C'); # fixme:
|
||||
$rpcenv->set_client_ip($clientip);
|
||||
$rpcenv->set_result_count(undef);
|
||||
|
||||
my $euid = $>;
|
||||
|
||||
@ -426,6 +429,9 @@ sub rest_handler {
|
||||
if (my $count = $rpcenv->get_result_count()) {
|
||||
$resp->{total} = $count;
|
||||
}
|
||||
if (my $diff = $rpcenv->get_result_changes()) {
|
||||
$resp->{changes} = $diff;
|
||||
}
|
||||
};
|
||||
my $err = $@;
|
||||
if ($err) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user