Commit 563b303b authored by tiagonbotelho's avatar tiagonbotelho

removes basicprojectwithaccess and replaces it with basicprojectdetails

parent b4a919ab
......@@ -342,14 +342,6 @@ module API
end
end
class BasicProjectWithAccess < BasicProjectDetails
expose :permissions do
expose :project_access, using: Entities::ProjectAccess do |project, options|
project.project_members.find_by(user_id: options[:user].id)
end
end
end
class ProjectWithAccess < Project
expose :permissions do
expose :project_access, using: Entities::ProjectAccess do |project, options|
......
......@@ -26,7 +26,7 @@ module API
@projects = filter_projects(@projects)
@projects = paginate @projects
if params[:simple]
present @projects, with: Entities::BasicProjectWithAccess, user: current_user
present @projects, with: Entities::BasicProjectDetails, user: current_user
else
present @projects, with: Entities::ProjectWithAccess, user: current_user
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