Commit 50bee8e9 authored by Rémy Coutable's avatar Rémy Coutable

Rename License entity to RepoLicense to avoid conflict with EE

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent b2370fef
...@@ -440,7 +440,7 @@ module API ...@@ -440,7 +440,7 @@ module API
expose :key, :value expose :key, :value
end end
class License < Grape::Entity class RepoLicense < Grape::Entity
expose :key, :name, :nickname expose :key, :name, :nickname
expose :featured, as: :popular expose :featured, as: :popular
expose :url, as: :html_url expose :url, as: :html_url
......
...@@ -24,7 +24,7 @@ module API ...@@ -24,7 +24,7 @@ module API
options = { options = {
featured: params[:popular].present? ? true : nil featured: params[:popular].present? ? true : nil
} }
present Licensee::License.all(options), with: Entities::License present Licensee::License.all(options), with: Entities::RepoLicense
end end
# Get text for specific license # Get text for specific license
...@@ -52,7 +52,7 @@ module API ...@@ -52,7 +52,7 @@ module API
fullname = params[:fullname].presence || current_user.try(:name) fullname = params[:fullname].presence || current_user.try(:name)
license.content.gsub!(FULLNAME_TEMPLATE_REGEX, fullname) if fullname license.content.gsub!(FULLNAME_TEMPLATE_REGEX, fullname) if fullname
present license, with: Entities::License present license, with: Entities::RepoLicense
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment