removes basicprojectwithaccess and replaces it with basicprojectdetails
This commit is contained in:
parent
b4a919ab9e
commit
563b303bde
Binary file not shown.
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue