diff options
author | Simon Green <simon@simongreen.net> | 2014-12-06 22:48:33 +0100 |
---|---|---|
committer | Simon Green <sgreen@redhat.com> | 2014-12-06 22:48:33 +0100 |
commit | 5db53c9ecf6270bd8ea6092c0893e96703f6ad61 (patch) | |
tree | 4e8330e4cf7f496721a137409c0a9af499ec90b8 /Bugzilla/WebService/Server | |
parent | 9d1dc1f24d6a43339ed00e8899cf579d2739401b (diff) | |
download | bugzilla-5db53c9ecf6270bd8ea6092c0893e96703f6ad61.tar.gz bugzilla-5db53c9ecf6270bd8ea6092c0893e96703f6ad61.tar.xz |
Bug 1052202 - Web Service module to update and delete components
r=dylan, a=glob
Diffstat (limited to 'Bugzilla/WebService/Server')
-rw-r--r-- | Bugzilla/WebService/Server/REST/Resources/Component.pm | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Bugzilla/WebService/Server/REST/Resources/Component.pm b/Bugzilla/WebService/Server/REST/Resources/Component.pm index 198c09332..47a8b9e0f 100644 --- a/Bugzilla/WebService/Server/REST/Resources/Component.pm +++ b/Bugzilla/WebService/Server/REST/Resources/Component.pm @@ -28,6 +28,34 @@ sub _rest_resources { success_code => STATUS_CREATED } }, + qr{^/component/(\d+)$}, { + PUT => { + method => 'update', + params => sub { + return { ids => [ $_[0] ] }; + } + }, + DELETE => { + method => 'delete', + params => sub { + return { ids => [ $_[0] ] }; + } + }, + }, + qr{^/component/([^/]+)/([^/]+)$}, { + PUT => { + method => 'update', + params => sub { + return { names => [ { product => $_[0], component => $_[1] } ] }; + } + }, + DELETE => { + method => 'delete', + params => sub { + return { names => [ { product => $_[0], component => $_[1] } ] }; + } + }, + }, ]; return $rest_resources; } |