diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-05-08 23:33:12 +0300 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-05-08 23:33:12 +0300 |
commit | c92f1d893cc5f114ec1e00251b3d1dcec78fab28 (patch) | |
tree | 8935a699fba25feb3ce0672acacf89c4e7836e2e /app/serializers/project_mirror_entity.rb | |
parent | 4babf79aa1e8e2ec315f31fba0d3646825322d91 (diff) | |
parent | d122279fb0a28f248e6cdba339cb1bcd96a91477 (diff) |
Merge branch '10-8-stable-prepare-rc4' into '10-8-stable'
Prepare 10.8 RC4 release
See merge request gitlab-org/gitlab-ce!18784
Diffstat (limited to 'app/serializers/project_mirror_entity.rb')
-rw-r--r-- | app/serializers/project_mirror_entity.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/serializers/project_mirror_entity.rb b/app/serializers/project_mirror_entity.rb new file mode 100644 index 00000000000..a9c08ac021a --- /dev/null +++ b/app/serializers/project_mirror_entity.rb @@ -0,0 +1,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 |