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:
authorNick Thomas <nick@gitlab.com>2018-11-12 13:52:48 +0300
committerNick Thomas <nick@gitlab.com>2018-11-19 14:46:39 +0300
commitf1bc7b6eb5cb9beab55e4edac87cc5e0b7ceb069 (patch)
tree2e5aedd22e2fd05909c1e97c5bc52602feadc825 /app/serializers/project_mirror_entity.rb
parentb1b4c94484b0613a6a457e32218d4f62b9eb2029 (diff)
SSH public-key authentication for push mirroring
Diffstat (limited to 'app/serializers/project_mirror_entity.rb')
-rw-r--r--app/serializers/project_mirror_entity.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/serializers/project_mirror_entity.rb b/app/serializers/project_mirror_entity.rb
index 8aba244cd11..c13cc3276a7 100644
--- a/app/serializers/project_mirror_entity.rb
+++ b/app/serializers/project_mirror_entity.rb
@@ -3,11 +3,7 @@
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
+ expose :remote_mirrors_attributes, using: RemoteMirrorEntity do |project|
+ project.remote_mirrors
end
end