summaryrefslogtreecommitdiff
path: root/app/serializers
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-03-28 12:48:53 +0200
committerPawel Chojnacki <pawel@chojnacki.ws>2017-03-28 12:52:13 +0200
commit73203873438d666427228ffdbfe835ea4ffddaa6 (patch)
tree0d9eb0ba084427bb0a3c2292bec1909cbda62c67 /app/serializers
parent601f50c6421f135b52f737a3b59baa32e6a8f1fd (diff)
downloadgitlab-ce-73203873438d666427228ffdbfe835ea4ffddaa6.tar.gz
Use DeploymentSerializer to create deployment json
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/deployment_entity.rb1
-rw-r--r--app/serializers/deployment_serializer.rb3
2 files changed, 4 insertions, 0 deletions
diff --git a/app/serializers/deployment_entity.rb b/app/serializers/deployment_entity.rb
index d610fbe0c8a..d9ade5d87e2 100644
--- a/app/serializers/deployment_entity.rb
+++ b/app/serializers/deployment_entity.rb
@@ -18,6 +18,7 @@ class DeploymentEntity < Grape::Entity
end
end
+ expose :created_at
expose :tag
expose :last?
expose :user, using: UserEntity
diff --git a/app/serializers/deployment_serializer.rb b/app/serializers/deployment_serializer.rb
new file mode 100644
index 00000000000..4b4bf6cd526
--- /dev/null
+++ b/app/serializers/deployment_serializer.rb
@@ -0,0 +1,3 @@
+class DeploymentSerializer < BaseSerializer
+ entity DeploymentEntity
+end