|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
package NGCP::Panel::Controller::API::BalanceIntervalsItem;
|
|
|
|
|
use NGCP::Panel::Utils::Generic qw(:all);
|
|
|
|
|
use Sipwise::Base;
|
|
|
|
|
use namespace::sweep;
|
|
|
|
|
use Moose;
|
|
|
|
|
#use namespace::sweep;
|
|
|
|
|
use boolean qw(true);
|
|
|
|
|
use HTTP::Headers qw();
|
|
|
|
|
use HTTP::Status qw(:constants);
|
|
|
|
@ -162,7 +164,7 @@ sub OPTIONS :Allow {
|
|
|
|
|
my ($self, $c, $id) = @_;
|
|
|
|
|
my $allowed_methods = $self->allowed_methods_filtered($c);
|
|
|
|
|
$c->response->headers(HTTP::Headers->new(
|
|
|
|
|
Allow => $allowed_methods->join(', '),
|
|
|
|
|
Allow => join(', ', @{ $allowed_methods }),
|
|
|
|
|
Accept_Patch => 'application/json-patch+json',
|
|
|
|
|
));
|
|
|
|
|
$c->response->content_type('application/json');
|
|
|
|
@ -211,7 +213,7 @@ sub item_options {
|
|
|
|
|
my ($self, $c, $id) = @_;
|
|
|
|
|
my $allowed_methods = [ 'GET', 'HEAD', 'OPTIONS' ];
|
|
|
|
|
$c->response->headers(HTTP::Headers->new(
|
|
|
|
|
Allow => $allowed_methods->join(', '),
|
|
|
|
|
Allow => join(', ', @{ $allowed_methods }),
|
|
|
|
|
Accept_Patch => 'application/json-patch+json',
|
|
|
|
|
));
|
|
|
|
|
$c->response->content_type('application/json');
|
|
|
|
@ -231,3 +233,6 @@ sub end : Private {
|
|
|
|
|
|
|
|
|
|
$self->log_response($c);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
no Moose;
|
|
|
|
|
1;
|
|
|
|
|