diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2017-02-25 11:44:09 +0300 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2017-03-07 10:36:42 +0300 |
commit | dd99622347e639e468b0538ebb57170c1299c858 (patch) | |
tree | 39cd5f1045ed4c3d65395d8878d0fe163f2d8e02 /lib/api/helpers.rb | |
parent | 6b2d4947a6300f006fd46360161687fd19e18659 (diff) |
API routes referencing a specific issue should use the issue `iid`
- As opposed to the issue `id` that was previously being used.
- This brings the API routes closer to the web interface's routes.
- This is specific to API v4.
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index f325f0a3050..2358a951bf1 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -82,8 +82,8 @@ module API label || not_found!('Label') end - def find_project_issue(id) - IssuesFinder.new(current_user, project_id: user_project.id).find(id) + def find_project_issue(iid) + IssuesFinder.new(current_user, project_id: user_project.id).find_by!(iid: iid) end def find_project_merge_request(id) |