Commit 1b74b0c3 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'nfriend-remove-pagination-from-deployment-frequency-api' into 'master'

Remove pagination from Deployment Frequency API

See merge request gitlab-org/gitlab!51137
parents 141b45f3 fd077f63
---
title: Remove pagination from Deployment Frequency API endpoint
merge_request: 51137
author:
type: changed
......@@ -105,15 +105,13 @@ module API
requires :from, type: DateTime, desc: 'Datetime to start from, inclusive'
optional :to, type: DateTime, desc: 'Datetime to end at, exclusive'
optional :interval, type: String, desc: 'Interval to roll-up data by', values: VALID_INTERVALS
use :pagination
end
get 'deployment_frequency' do
bad_request!("Parameter `to` is before the `from` date") if start_date > end_date
bad_request!("Date range is greater than #{QUARTER_DAYS} days") if days_between > QUARTER_DAYS
authorize! :read_project_activity_analytics, user_project
present paginate(::Kaminari.paginate_array(deployment_frequencies)),
with: EE::API::Entities::Analytics::DeploymentFrequency
present deployment_frequencies, with: EE::API::Entities::Analytics::DeploymentFrequency
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment