diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-06 16:54:30 +0100 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-07 12:20:00 +0100 |
commit | 626e79b6f5ed18e1d023643d3e4b85dc4f20286c (patch) | |
tree | e1579e1f457f25ae2c511d8e812fa2956eef0e01 /lib/api/v3/entities.rb | |
parent | 5985b55769303824f0ce64ae293b0498f2edfc1b (diff) | |
download | gitlab-ce-626e79b6f5ed18e1d023643d3e4b85dc4f20286c.tar.gz |
Split V3 entities into a separate fileapi-remove-snippets-expires-at
Diffstat (limited to 'lib/api/v3/entities.rb')
-rw-r--r-- | lib/api/v3/entities.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/api/v3/entities.rb b/lib/api/v3/entities.rb new file mode 100644 index 00000000000..3cc0dc968a8 --- /dev/null +++ b/lib/api/v3/entities.rb @@ -0,0 +1,16 @@ +module API + module V3 + module Entities + class ProjectSnippet < Grape::Entity + expose :id, :title, :file_name + expose :author, using: ::API::Entities::UserBasic + expose :updated_at, :created_at + expose(:expires_at) { |snippet| nil } + + expose :web_url do |snippet, options| + Gitlab::UrlBuilder.build(snippet) + end + end + end + end +end |