From 344a47497d421f84a9f38d9508f5f35ab46b92ea Mon Sep 17 00:00:00 2001 From: Irina Peshinskaya Date: Thu, 5 Nov 2015 00:31:39 +0200 Subject: [PATCH] MT#14477 Response about faxserver feature unavailability from API Change-Id: I98dceb0fe75e54ffc39dc9cd9ef9507feff8af33 (cherry picked from commit 8261f0ec0ea3756ce0a25c65396a985545abc259) --- lib/NGCP/Panel/Controller/API/Faxes.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/NGCP/Panel/Controller/API/Faxes.pm b/lib/NGCP/Panel/Controller/API/Faxes.pm index 8096e470f8..7867bc1149 100644 --- a/lib/NGCP/Panel/Controller/API/Faxes.pm +++ b/lib/NGCP/Panel/Controller/API/Faxes.pm @@ -147,6 +147,11 @@ sub OPTIONS :Allow { sub POST :Allow { my ($self, $c) = @_; { + if(!$c->config->{features}->{faxserver}){ + $c->log->error("faxserver feature is not active."); + $self->error($c, HTTP_UNPROCESSABLE_ENTITY, "Faxserver feature is not active."); + return; + } last unless $self->forbid_link_header($c); last unless $self->valid_media_type($c, 'multipart/form-data'); my $json_utf8 = encode_utf8($c->req->param('json'));