erged into the user specified in the request body.
B<Request Format:>
Content-Type: application/json
{
"User": "target_user_id_or_name"
}
The C<User> field is required and can be e
23/merge \
-H "Authorization: token YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"User": "456"}'
=head2 POST /user/{id}/unmerge
Unmerge users that have been me
alled with an empty JSON body or no C<User> parameter, this will unmerge
ALL users that have been merged into the specified user.
B<Request Format:>
Content-Type: application/json
{}
B<Respons
e::User;
use strict;
use warnings;
use Moose;
use namespace::autoclean;
use JSON ();
use RT::REST2::Util qw( error_as_json );
has 'action' => (
is => 'ro',
isa => 'Str',
);
has 'merge_data
on && ($self->action eq 'merge' || $self->action eq 'unmerge')) {
return [ { 'application/json' => 'handle_merge_action' } ];
}
return $self->$orig(@_);
};
around 'allowed_methods' =
_json(
$self->response,
\403, "Permission denied");
}
my $body;
eval {
my $content = $self->request->content;
$body = $content ? JSON::decode_json(