diff options
author | Stan Hu <stanhu@gmail.com> | 2019-02-14 08:06:38 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-02-14 08:06:38 +0300 |
commit | 22f63b7b5471111517bdbd2ec3ced67134a37aaf (patch) | |
tree | ab694cec755c66ea49ea78f1059f42b6375f25ca /lib | |
parent | c6016ac8a8c12a736617e5250b63e0c930dda207 (diff) |
Revert "Merge branch '50559-add-milestone-progress-to-api' into 'master'"
This reverts merge request !25173
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 3 | ||||
-rw-r--r-- | lib/api/milestone_responses.rb | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 0ef56067b95..173e86dfd3b 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -502,9 +502,6 @@ module API expose :state, :created_at, :updated_at expose :due_date expose :start_date - expose :percentage_complete do |milestone, options| - milestone.percent_complete(options[:current_user]) - end expose :web_url do |milestone, _options| Gitlab::UrlBuilder.build(milestone) diff --git a/lib/api/milestone_responses.rb b/lib/api/milestone_responses.rb index 4c68c568aaa..a0ca39b69d4 100644 --- a/lib/api/milestone_responses.rb +++ b/lib/api/milestone_responses.rb @@ -35,19 +35,19 @@ module API milestones = filter_by_iid(milestones, params[:iids]) if params[:iids].present? milestones = filter_by_search(milestones, params[:search]) if params[:search] - present paginate(milestones), with: Entities::Milestone, current_user: current_user + present paginate(milestones), with: Entities::Milestone end def get_milestone_for(parent) milestone = parent.milestones.find(params[:milestone_id]) - present milestone, with: Entities::Milestone, current_user: current_user + present milestone, with: Entities::Milestone end def create_milestone_for(parent) milestone = ::Milestones::CreateService.new(parent, current_user, declared_params).execute if milestone.valid? - present milestone, with: Entities::Milestone, current_user: current_user + present milestone, with: Entities::Milestone else render_api_error!("Failed to create milestone #{milestone.errors.messages}", 400) end @@ -60,7 +60,7 @@ module API milestone = ::Milestones::UpdateService.new(parent, current_user, milestone_params).execute(milestone) if milestone.valid? - present milestone, with: Entities::Milestone, current_user: current_user + present milestone, with: Entities::Milestone else render_api_error!("Failed to update milestone #{milestone.errors.messages}", 400) end |