diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-06 14:25:49 +0100 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-07 12:16:00 +0100 |
commit | 5985b55769303824f0ce64ae293b0498f2edfc1b (patch) | |
tree | 22a07e06188ce4c22cfe5f03cf23f7684cf59306 /lib/api/entities.rb | |
parent | 96baf2bc4f0f6177badd61e59f5a0434dd12f7ac (diff) | |
download | gitlab-ce-5985b55769303824f0ce64ae293b0498f2edfc1b.tar.gz |
Remove deprecated 'expires_at' from project snippets API
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index b1ead48caf7..d296fbb9313 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -213,9 +213,6 @@ module API expose :author, using: Entities::UserBasic expose :updated_at, :created_at - # TODO (rspeicher): Deprecated; remove in 9.0 - expose(:expires_at) { |snippet| nil } - expose :web_url do |snippet, options| Gitlab::UrlBuilder.build(snippet) end @@ -697,5 +694,19 @@ module API expose :id, :message, :starts_at, :ends_at, :color, :font expose :active?, as: :active end + + # Entities for the deprecated V3 API + class ProjectSnippetV3 < Grape::Entity + expose :id, :title, :file_name + expose :author, using: Entities::UserBasic + expose :updated_at, :created_at + + # TODO (rspeicher): Deprecated; remove in 9.0 + expose(:expires_at) { |snippet| nil } + + expose :web_url do |snippet, options| + Gitlab::UrlBuilder.build(snippet) + end + end end end |