diff options
author | Robert Schilling <2900-razer6@users.noreply.gitlab.com> | 2019-02-13 15:24:13 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-02-13 15:24:13 +0300 |
commit | 3328f097c9e0936635d580806857e870eb15c1b4 (patch) | |
tree | e2c05e8184866ef78e6a65995b26036a6297897e /lib/api/milestone_responses.rb | |
parent | c0fa62b5d275508449ad97c8cecd8cd6bba1ef15 (diff) |
Add milestone progress to API
Diffstat (limited to 'lib/api/milestone_responses.rb')
-rw-r--r-- | lib/api/milestone_responses.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/milestone_responses.rb b/lib/api/milestone_responses.rb index a0ca39b69d4..4c68c568aaa 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 + present paginate(milestones), with: Entities::Milestone, current_user: current_user end def get_milestone_for(parent) milestone = parent.milestones.find(params[:milestone_id]) - present milestone, with: Entities::Milestone + present milestone, with: Entities::Milestone, current_user: current_user end def create_milestone_for(parent) milestone = ::Milestones::CreateService.new(parent, current_user, declared_params).execute if milestone.valid? - present milestone, with: Entities::Milestone + present milestone, with: Entities::Milestone, current_user: current_user 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 + present milestone, with: Entities::Milestone, current_user: current_user else render_api_error!("Failed to update milestone #{milestone.errors.messages}", 400) end |