debian-mirror-gitlab/lib/api/helpers/common_helpers.rb

20 lines
440 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
module API
module Helpers
module CommonHelpers
def convert_parameters_from_legacy_format(params)
params.tap do |params|
2018-03-17 18:26:18 +05:30
assignee_id = params.delete(:assignee_id)
if assignee_id.present?
params[:assignee_ids] = [assignee_id]
2017-08-17 22:00:37 +05:30
end
end
end
end
end
end
2020-01-01 13:55:28 +05:30
API::Helpers::CommonHelpers.prepend_if_ee('EE::API::Helpers::CommonHelpers')