summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/Server/REST/Resources
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/WebService/Server/REST/Resources')
-rw-r--r--Bugzilla/WebService/Server/REST/Resources/Bug.pm17
-rw-r--r--Bugzilla/WebService/Server/REST/Resources/FlagType.pm19
2 files changed, 17 insertions, 19 deletions
diff --git a/Bugzilla/WebService/Server/REST/Resources/Bug.pm b/Bugzilla/WebService/Server/REST/Resources/Bug.pm
index d0f470fcd..7ab111d86 100644
--- a/Bugzilla/WebService/Server/REST/Resources/Bug.pm
+++ b/Bugzilla/WebService/Server/REST/Resources/Bug.pm
@@ -151,23 +151,6 @@ sub _rest_resources {
}
}
},
- qr{^/flag_types/([^/]+)/([^/]+)$}, {
- GET => {
- method => 'flag_types',
- params => sub {
- return { product => $_[0],
- component => $_[1] };
- }
- }
- },
- qr{^/flag_types/([^/]+)$}, {
- GET => {
- method => 'flag_types',
- params => sub {
- return { product => $_[0] };
- }
- }
- }
];
return $rest_resources;
}
diff --git a/Bugzilla/WebService/Server/REST/Resources/FlagType.pm b/Bugzilla/WebService/Server/REST/Resources/FlagType.pm
index 745785838..1de5b1264 100644
--- a/Bugzilla/WebService/Server/REST/Resources/FlagType.pm
+++ b/Bugzilla/WebService/Server/REST/Resources/FlagType.pm
@@ -21,13 +21,28 @@ BEGIN {
sub _rest_resources {
my $rest_resources = [
- qr{^/flagtype$}, {
+ qr{^/flag_type$}, {
POST => {
method => 'create',
success_code => STATUS_CREATED
}
},
- qr{^/flagtype/([^/]+)$}, {
+ qr{^/flag_type/([^/]+)/([^/]+)$}, {
+ GET => {
+ method => 'get',
+ params => sub {
+ return { product => $_[0],
+ component => $_[1] };
+ }
+ }
+ },
+ qr{^/flag_type/([^/]+)$}, {
+ GET => {
+ method => 'get',
+ params => sub {
+ return { product => $_[0] };
+ }
+ },
PUT => {
method => 'update',
params => sub {