diff options
Diffstat (limited to 'Bugzilla/WebService/Server/REST/Resources/Group.pm')
-rw-r--r-- | Bugzilla/WebService/Server/REST/Resources/Group.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Bugzilla/WebService/Server/REST/Resources/Group.pm b/Bugzilla/WebService/Server/REST/Resources/Group.pm index 9200d609d..e61408753 100644 --- a/Bugzilla/WebService/Server/REST/Resources/Group.pm +++ b/Bugzilla/WebService/Server/REST/Resources/Group.pm @@ -9,6 +9,7 @@ package Bugzilla::WebService::Server::REST::Resources::Group; use 5.10.1; use strict; +use warnings; use Bugzilla::WebService::Constants; use Bugzilla::WebService::Group; @@ -20,12 +21,22 @@ BEGIN { sub _rest_resources { my $rest_resources = [ qr{^/group$}, { + GET => { + method => 'get' + }, POST => { method => 'create', success_code => STATUS_CREATED } }, qr{^/group/([^/]+)$}, { + GET => { + method => 'get', + params => sub { + my $param = $_[0] =~ /^\d+$/ ? 'ids' : 'names'; + return { $param => [ $_[0] ] }; + } + }, PUT => { method => 'update', params => sub { |