Change-Id: I06cdb731bbfea459a43344aa66c61735bd156f1achanges/30/10030/14
parent
64cf8d64fc
commit
37a1996a9a
@ -0,0 +1,32 @@
|
|||||||
|
package NGCP::Panel::Controller::API::SoundGroups;
|
||||||
|
|
||||||
|
|
||||||
|
use Sipwise::Base;
|
||||||
|
use parent qw/NGCP::Panel::Role::Entities NGCP::Panel::Role::API::SoundGroups/;
|
||||||
|
|
||||||
|
use HTTP::Status qw(:constants);
|
||||||
|
use NGCP::Panel::Utils::Security;
|
||||||
|
|
||||||
|
__PACKAGE__->set_config();
|
||||||
|
|
||||||
|
sub allowed_methods {
|
||||||
|
return [qw/GET OPTIONS HEAD/];
|
||||||
|
}
|
||||||
|
|
||||||
|
sub api_description {
|
||||||
|
return 'Defines sound handles groups.';
|
||||||
|
}
|
||||||
|
|
||||||
|
sub query_params {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
param => 'name',
|
||||||
|
description => 'Filter for sound groups with a specific name',
|
||||||
|
query_type => 'string_like',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
# vim: set tabstop=4 expandtab:
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package NGCP::Panel::Controller::API::SoundGroupsItem;
|
||||||
|
|
||||||
|
use Sipwise::Base;
|
||||||
|
use parent qw/NGCP::Panel::Role::EntitiesItem NGCP::Panel::Role::API::SoundGroups/;
|
||||||
|
|
||||||
|
use HTTP::Status qw(:constants);
|
||||||
|
|
||||||
|
__PACKAGE__->set_config();
|
||||||
|
|
||||||
|
sub allowed_methods{
|
||||||
|
return [qw/GET OPTIONS HEAD/];
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
# vim: set tabstop=4 expandtab:
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package NGCP::Panel::Role::API::SoundGroups;
|
||||||
|
|
||||||
|
use Sipwise::Base;
|
||||||
|
|
||||||
|
use parent qw/NGCP::Panel::Role::API/;
|
||||||
|
|
||||||
|
use NGCP::Panel::Utils::Generic qw(:all);
|
||||||
|
use boolean qw(true);
|
||||||
|
use HTTP::Status qw(:constants);
|
||||||
|
|
||||||
|
sub item_name {
|
||||||
|
return 'soundgroups';
|
||||||
|
}
|
||||||
|
|
||||||
|
sub resource_name{
|
||||||
|
return 'soundgroups';
|
||||||
|
}
|
||||||
|
|
||||||
|
sub _item_rs {
|
||||||
|
my ($self, $c) = @_;
|
||||||
|
my $item_rs;
|
||||||
|
$item_rs = $c->model('DB')->resultset('voip_sound_groups');
|
||||||
|
return $item_rs;
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
# vim: set tabstop=4 expandtab:
|
||||||
Loading…
Reference in new issue