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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2018-05-03 15:55:14 +0300
committerTiago Botelho <tiagonbotelho@hotmail.com>2018-05-07 12:59:51 +0300
commit9a13059332a0c81b3a953f57bb9e40346eba951d (patch)
tree8f2806ec52b77cd212a19f9756c837606d988c62 /app/serializers/project_mirror_entity.rb
parent2d84de9ec90b87ee4e1e10ce1a4a9d00b07c39e7 (diff)
Backports every CE related change from ee-5484 to CE
Diffstat (limited to 'app/serializers/project_mirror_entity.rb')
-rw-r--r--app/serializers/project_mirror_entity.rb13
1 files changed, 13 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..8051f6e7d35
--- /dev/null
+++ b/app/serializers/project_mirror_entity.rb
@@ -0,0 +1,13 @@
+class ProjectMirrorEntity < Grape::Entity
+ prepend ::EE::ProjectMirrorEntity
+
+ 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