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

project_mirror_entity.rb « serializers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a9c08ac021ad3b4940373790937b22023560db0a (plain)
1
2
3
4
5
6
7
8
9
10
11
class ProjectMirrorEntity < Grape::Entity
  expose :id

  expose :remote_mirrors_attributes do |project|
    next [] unless project.remote_mirrors.present?

    project.remote_mirrors.map do |remote|
      remote.as_json(only: %i[id url enabled])
    end
  end
end