Commit c9732b3c authored by Mark Fletcher's avatar Mark Fletcher

Employ declared_params in finder methods for MR and Issue API lists

- Ensure that unwanted params are no passed to actual finder classes
parent 5b880f0d
...@@ -8,7 +8,7 @@ module API ...@@ -8,7 +8,7 @@ module API
helpers do helpers do
def find_issues(args = {}) def find_issues(args = {})
args = params.merge(args) args = declared_params.merge(args)
args.delete(:id) args.delete(:id)
args[:milestone_title] = args.delete(:milestone) args[:milestone_title] = args.delete(:milestone)
......
...@@ -8,7 +8,7 @@ module API ...@@ -8,7 +8,7 @@ module API
helpers do helpers do
def find_merge_requests(args = {}) def find_merge_requests(args = {})
args = params.merge(args) args = declared_params.merge(args)
args[:milestone_title] = args.delete(:milestone) args[:milestone_title] = args.delete(:milestone)
args[:label_name] = args.delete(:labels) args[:label_name] = args.delete(:labels)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment