Minor refactoring of ProjectsAPI

Remove unnecessary ivars, absolute namespacing.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/1634/head
Alex Coles 10 years ago
parent c5e97921cf
commit 6a64927d57
  1. 5
      lib/api/v3/projects/projects_api.rb

@ -39,13 +39,12 @@ module API
namespace ':id' do
before do
@project = Project.find(params[:id])
model = ::API::V3::Projects::ProjectModel.new(@project)
@representer = ::API::V3::Projects::ProjectRepresenter.new(model)
@model = ProjectModel.new(@project)
end
get do
authorize(:view_project, context: @project)
@representer
ProjectRepresenter.new(@model)
end
mount API::V3::Versions::VersionsAPI

Loading…
Cancel
Save