提交 563b303b 编写于 作者: T tiagonbotelho

removes basicprojectwithaccess and replaces it with basicprojectdetails

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册