diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2013-07-23 22:35:06 +0200 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2013-07-23 22:35:06 +0200 |
commit | e5ebce2b90812b88e5f3c8a5b7b7249ac70df9e7 (patch) | |
tree | 605e85af338011a1e772a0165c7335b6708ca3a5 /Bugzilla/WebService/Server/REST | |
parent | d457abd70ac0332d1226e393578c942f4a48cb0a (diff) | |
download | bugzilla-e5ebce2b90812b88e5f3c8a5b7b7249ac70df9e7.tar.gz bugzilla-e5ebce2b90812b88e5f3c8a5b7b7249ac70df9e7.tar.xz |
Bug 897093 - Port the upstream Product.get webservice changes (bug 896066) to bmo/4.2
Diffstat (limited to 'Bugzilla/WebService/Server/REST')
-rw-r--r-- | Bugzilla/WebService/Server/REST/Resources/Product.pm | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/Bugzilla/WebService/Server/REST/Resources/Product.pm b/Bugzilla/WebService/Server/REST/Resources/Product.pm index 1949282e9..acee3887b 100644 --- a/Bugzilla/WebService/Server/REST/Resources/Product.pm +++ b/Bugzilla/WebService/Server/REST/Resources/Product.pm @@ -21,17 +21,24 @@ BEGIN { sub _rest_resources { my $rest_resources = [ + qr{^/product_accessible$}, { + GET => { + method => 'get_accessible_products' + } + }, + qr{^/product_enterable$}, { + GET => { + method => 'get_enterable_products' + } + }, + qr{^/product_selectable$}, { + GET => { + method => 'get_selectable_products' + } + }, qr{^/product$}, { GET => { - method => sub { - my $type = Bugzilla->input_params->{type}; - return 'get_accessible_products' - if !defined $type || $type eq 'accessible'; - return 'get_enterable_products' if $type eq 'enterable'; - return 'get_selectable_products' if $type eq 'selectable'; - ThrowUserError('rest_get_products_invalid_type', - { type => $type }); - }, + method => 'get' }, POST => { method => 'create', |