Commit d3cc857c authored by Nick Thomas's avatar Nick Thomas

Rename the EE-only `API::Entities::License` to `API:Entities::GitlabLicense`

The CE->EE merge renamed `RepoLicense` to `License`. It's easier to rename
the EE-only code than to try to sort it out.
parent 6b79ed9d
......@@ -865,7 +865,7 @@ module API
end
end
class License < Grape::Entity
class GitlabLicense < Grape::Entity
expose :starts_at, :expires_at, :licensee, :add_ons
expose :user_limit do |license, options|
......
......@@ -4,16 +4,16 @@ module API
resource :license do
desc 'Get information on the currently active license' do
success Entities::License
success Entities::GitlabLicense
end
get do
license = ::License.current
present license, with: Entities::License
present license, with: Entities::GitlabLicense
end
desc 'Add a new license' do
success Entities::License
success Entities::GitlabLicense
end
params do
requires :license, type: String, desc: 'The license text'
......@@ -21,7 +21,7 @@ module API
post do
license = ::License.new(data: params[:license])
if license.save
present license, with: Entities::License
present license, with: Entities::GitlabLicense
else
render_api_error!(license.errors.full_messages.first, 400)
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