2018-07-19 14:43:13 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-11-18 21:19:04 -05:00
|
|
|
class LabelEntity < Grape::Entity
|
2020-10-14 08:08:58 -04:00
|
|
|
expose :id
|
2017-07-07 08:54:49 -04:00
|
|
|
|
2016-11-18 21:19:04 -05:00
|
|
|
expose :title
|
|
|
|
expose :color
|
|
|
|
expose :description
|
|
|
|
expose :group_id
|
2020-10-14 08:08:58 -04:00
|
|
|
expose :project_id
|
2016-11-18 21:19:04 -05:00
|
|
|
expose :template
|
2017-05-05 18:47:32 -04:00
|
|
|
expose :text_color
|
2016-11-18 21:19:04 -05:00
|
|
|
expose :created_at
|
|
|
|
expose :updated_at
|
2018-12-03 10:23:38 -05:00
|
|
|
|
|
|
|
expose :priority, if: -> (*) { options.key?(:project) } do |label|
|
|
|
|
label.priority(options[:project])
|
|
|
|
end
|
2016-11-18 21:19:04 -05:00
|
|
|
end
|