debian-mirror-gitlab/lib/api/user_counts.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
467 B
Ruby
Raw Normal View History

2019-09-30 21:07:59 +05:30
# frozen_string_literal: true
module API
2021-01-03 14:25:43 +05:30
class UserCounts < ::API::Base
2021-01-29 00:20:46 +05:30
feature_category :navigation
2022-07-23 23:45:48 +05:30
urgency :low
2021-01-29 00:20:46 +05:30
2019-09-30 21:07:59 +05:30
resource :user_counts do
desc 'Return the user specific counts' do
2021-10-27 15:23:28 +05:30
detail 'Assigned open issues, assigned MRs and pending todos count'
2023-01-13 00:05:48 +05:30
success Entities::UserCounts
2019-09-30 21:07:59 +05:30
end
get do
unauthorized! unless current_user
2023-01-13 00:05:48 +05:30
present current_user, with: Entities::UserCounts
2019-09-30 21:07:59 +05:30
end
end
end
end