diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2017-02-28 11:53:58 +0300 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2017-03-07 11:26:00 +0300 |
commit | 519bac658ae7e92e8454d7ed6445cf286c12fcb6 (patch) | |
tree | b5f28da8008c418dc9d82f467cedbc07793ff971 /lib/api/time_tracking_endpoints.rb | |
parent | 9ccd8b8755d8c99a1c519d7251e7373df9812513 (diff) |
Fix time tracking endpoints for API v4
- Use issue/merge_request IID instead of ID
- Duplicate the original `TimeTrackingEndpoints` concern (+ specs) for V3, since
this is a breaking change.
Diffstat (limited to 'lib/api/time_tracking_endpoints.rb')
-rw-r--r-- | lib/api/time_tracking_endpoints.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/time_tracking_endpoints.rb b/lib/api/time_tracking_endpoints.rb index 85b5f7d98b8..05b4b490e27 100644 --- a/lib/api/time_tracking_endpoints.rb +++ b/lib/api/time_tracking_endpoints.rb @@ -5,11 +5,11 @@ module API included do helpers do def issuable_name - declared_params.has_key?(:issue_id) ? 'issue' : 'merge_request' + declared_params.has_key?(:issue_iid) ? 'issue' : 'merge_request' end def issuable_key - "#{issuable_name}_id".to_sym + "#{issuable_name}_iid".to_sym end def update_issuable_key @@ -50,7 +50,7 @@ module API issuable_name = name.end_with?('Issues') ? 'issue' : 'merge_request' issuable_collection_name = issuable_name.pluralize - issuable_key = "#{issuable_name}_id".to_sym + issuable_key = "#{issuable_name}_iid".to_sym desc "Set a time estimate for a project #{issuable_name}" params do |