Skip to content
Snippets Groups Projects
Commit 563b303b authored by tiagonbotelho's avatar tiagonbotelho
Browse files

removes basicprojectwithaccess and replaces it with basicprojectdetails

parent b4a919ab
No related branches found
No related tags found
No related merge requests found
File added
Loading
Loading
@@ -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|
Loading
Loading
Loading
Loading
@@ -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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment