summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/api/entities.rb2
-rw-r--r--lib/api/licenses.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index e7af928b0e9..716ca6f7ed9 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -440,7 +440,7 @@ module API
expose :key, :value
end
- class License < Grape::Entity
+ class RepoLicense < Grape::Entity
expose :key, :name, :nickname
expose :featured, as: :popular
expose :url, as: :html_url
diff --git a/lib/api/licenses.rb b/lib/api/licenses.rb
index f9536fc82bb..187d2c04703 100644
--- a/lib/api/licenses.rb
+++ b/lib/api/licenses.rb
@@ -24,7 +24,7 @@ module API
options = {
featured: params[:popular].present? ? true : nil
}
- present Licensee::License.all(options), with: Entities::License
+ present Licensee::License.all(options), with: Entities::RepoLicense
end
# Get text for specific license
@@ -52,7 +52,7 @@ module API
fullname = params[:fullname].presence || current_user.try(:name)
license.content.gsub!(FULLNAME_TEMPLATE_REGEX, fullname) if fullname
- present license, with: Entities::License
+ present license, with: Entities::RepoLicense
end
end
end