You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-panel/lib/NGCP/Panel/Controller/API/PbxDeviceModelsItem.pm

30 lines
788 B

package NGCP::Panel::Controller::API::PbxDeviceModelsItem;
use Sipwise::Base;
use NGCP::Panel::Utils::Generic qw(:all);
use parent qw/NGCP::Panel::Role::EntitiesItem NGCP::Panel::Role::API::PbxDeviceModels/;
__PACKAGE__->set_config();
sub _set_config{
my ($self, $method) = @_;
$method //='';
if ('PUT' eq $method || 'PATCH' eq $method){
return {
'ContentType' => ['multipart/form-data'],#,
'Uploads' => [qw/front_image mac_image/],
# Also correct way for the allowed_roles, and really the last word. Will be applied over all others.
# 'AllowedRole' => [qw/admin reseller/],
};
}
return {};
}
sub allowed_methods{
return [qw/GET OPTIONS HEAD PATCH PUT/];
}
1;
# vim: set tabstop=4 expandtab: