2019-07-09 08:44:19 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
2020-04-28 03:09:53 +00:00
|
|
|
class UserCounts < Grape::API
|
2019-07-09 08:44:19 +00:00
|
|
|
resource :user_counts do
|
|
|
|
desc 'Return the user specific counts' do
|
|
|
|
detail 'Open MR Count'
|
|
|
|
end
|
|
|
|
get do
|
|
|
|
unauthorized! unless current_user
|
|
|
|
|
|
|
|
{
|
|
|
|
merge_requests: current_user.assigned_open_merge_requests_count
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|