MT#65890 Fix regression on PATCH calls to CallForwardsItem api

Add missing "add" and "remove" operations for /api/callforwardsitem
PATCH

When the endpoint was refactored in commit 205b27a26
to use the EntitiesItem, this block was dropped

-        my $json = $self->get_valid_patch_data(
-            c => $c,
-            id => $id,
-            media_type => 'application/json-patch+json',
-            ops => [qw/add replace remove copy/],
-        );

And by default EntitiesItem allows only "replace, copy" operations.

They missing operations are added back using
set_config({
    PATCH => { ops => [qw/add replace remove copy/] },
})

Change-Id: Id9c131d679511efa1eeef040373ae7b53a4f93f8
master
Marco Capetta 2 weeks ago committed by Kirill Solomko
parent 5cf446e477
commit f7ac7d96be

@ -41,7 +41,8 @@ __PACKAGE__->set_config({
allowed_roles => {
Default => [qw/admin reseller ccareadmin ccare subscriberadmin subscriber/],
Journal => [qw/admin reseller subscriberadmin subscriber/],
}
},
PATCH => { ops => [qw/add replace remove copy/] },
});
sub delete_item {

Loading…
Cancel
Save