diff options
| author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-02-28 21:14:25 +0100 |
|---|---|---|
| committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-02-28 21:14:25 +0100 |
| commit | 79a5e7fb539dc6df7de590efb69fb9ab9d4614eb (patch) | |
| tree | 951e2f3194c4b4d5488864791a9a94afe7122280 /lib/api/entities.rb | |
| parent | 729391fbfce4dea58478b65c684a24a1bfd125a2 (diff) | |
| parent | 7e424eb852716495073881710e8a8851b4a4cd5a (diff) | |
| download | gitlab-ce-79a5e7fb539dc6df7de590efb69fb9ab9d4614eb.tar.gz | |
Merge commit '7e424eb852716495073881710e8a8851b4a4cd5a' into object-storage-ee-to-ce-backport
Diffstat (limited to 'lib/api/entities.rb')
| -rw-r--r-- | lib/api/entities.rb | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index e13463ec66b..7838de13c56 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -314,24 +314,20 @@ module API end end - class ProjectSnippet < Grape::Entity + class Snippet < Grape::Entity expose :id, :title, :file_name, :description expose :author, using: Entities::UserBasic expose :updated_at, :created_at - - expose :web_url do |snippet, options| + expose :project_id + expose :web_url do |snippet| Gitlab::UrlBuilder.build(snippet) end end - class PersonalSnippet < Grape::Entity - expose :id, :title, :file_name, :description - expose :author, using: Entities::UserBasic - expose :updated_at, :created_at + class ProjectSnippet < Snippet + end - expose :web_url do |snippet| - Gitlab::UrlBuilder.build(snippet) - end + class PersonalSnippet < Snippet expose :raw_url do |snippet| Gitlab::UrlBuilder.build(snippet) + "/raw" end @@ -1168,5 +1164,14 @@ module API class ApplicationWithSecret < Application expose :secret end + + class Blob < Grape::Entity + expose :basename + expose :data + expose :filename + expose :id + expose :ref + expose :startline + end end end |
