diff options
author | Mark Fletcher <mark@gitlab.com> | 2017-05-29 08:49:17 +0300 |
---|---|---|
committer | Mark Fletcher <mark@gitlab.com> | 2017-06-06 15:16:41 +0300 |
commit | ad3e180ed3d99494414cb1b367f6b4e40ec28b87 (patch) | |
tree | 155c4e0f6b5529b3911a42ae2e8d5e80002c5a21 /lib/api/users.rb | |
parent | e34e5761042579686fe149f16e7ec107b80224d2 (diff) |
Introduce an Events API
* Meld the following disparate endpoints:
* `/projects/:id/events`
* `/events`
* `/users/:id/events`
+ Add result filtering to the above endpoints:
* action
* target_type
* before and after dates
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r-- | lib/api/users.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index e8694e90cf2..3f87a403a09 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -328,27 +328,6 @@ module API end end - desc 'Get the contribution events of a specified user' do - detail 'This feature was introduced in GitLab 8.13.' - success Entities::Event - end - params do - requires :id, type: Integer, desc: 'The ID of the user' - use :pagination - end - get ':id/events' do - user = User.find_by(id: params[:id]) - not_found!('User') unless user - - events = user.events. - merge(ProjectsFinder.new(current_user: current_user).execute). - references(:project). - with_associations. - recent - - present paginate(events), with: Entities::Event - end - params do requires :user_id, type: Integer, desc: 'The ID of the user' end |