2018-07-19 14:43:13 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-06-09 17:24:54 -04:00
|
|
|
class DiscussionSerializer < BaseSerializer
|
|
|
|
entity DiscussionEntity
|
2019-07-17 09:06:19 -04:00
|
|
|
|
|
|
|
def represent(resource, opts = {}, entity_class = nil)
|
|
|
|
super(resource, with_additional_opts(opts), entity_class)
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def with_additional_opts(opts)
|
|
|
|
additional_opts = {
|
|
|
|
submodule_links: Gitlab::SubmoduleLinks.new(@request.project.repository)
|
|
|
|
}
|
|
|
|
|
|
|
|
opts.merge(additional_opts)
|
|
|
|
end
|
2017-06-09 17:24:54 -04:00
|
|
|
end
|
2019-09-13 09:26:31 -04:00
|
|
|
|
2021-05-11 17:10:21 -04:00
|
|
|
DiscussionSerializer.prepend_mod_with('DiscussionSerializer')
|