Welcome to mirror list, hosted at ThFree Co, Russian Federation.

create_service.rb « abuse_report_labels « admin « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 937890a9f5175db0c04ea6113068a9538b0aa60c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Admin
  module AbuseReportLabels
    class CreateService < Labels::BaseService
      def initialize(params = {})
        @params = params
      end

      def execute
        params[:color] = convert_color_name_to_hex if params[:color].present?

        ::Admin::AbuseReportLabel.create(params)
      end
    end
  end
end