TT#47906 Fix discrepancy between doc and code in /api/soundsets/

generated from form api doc shows contract_id parameter, but code consider only customer_id

Change-Id: I55a91e052a04ee182b1d39f89ff5543439945c72
changes/17/25017/2
Irina Peshinskaya 8 years ago
parent e0ee27d2bb
commit 4ceb7754b7

@ -126,8 +126,8 @@ sub POST :Allow {
media_type => 'application/json',
);
last unless $resource;
$resource->{contract_id} = delete $resource->{customer_id};
my $customer_id = delete $resource->{customer_id};
$resource->{contract_id} //= $customer_id;
my $form = $self->get_form($c);
last unless $self->validate_form(
c => $c,

@ -100,7 +100,8 @@ sub item_by_id {
sub update_item {
my ($self, $c, $item, $old_resource, $resource, $form) = @_;
$resource->{contract_id} = delete $resource->{customer_id};
my $customer_id = delete $resource->{customer_id};
$resource->{contract_id} //= $customer_id;
$form //= $self->get_form($c);
return unless $self->validate_form(
c => $c,

Loading…
Cancel
Save