fixed 项目列表查询count优化

This commit is contained in:
“xxq250”
2022-11-08 17:18:04 +08:00
parent f4794f6489
commit 1f2af50091
3 changed files with 6 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
json.total_count @projects.total_count
json.total_count @total_count
json.projects @projects do |project|
# json.partial! "/projects/project_detail", project: project
json.id project.id
@@ -22,7 +22,7 @@ json.projects @projects do |project|
project_educoder = project.project_educoder
json.name project_educoder&.owner
json.login project_educoder&.repo_name.split('/')[0]
json.image_url render_educoder_avatar_url(project.project_educoder)
# json.image_url render_educoder_avatar_url(project.project_educoder)
else
user = project.owner
json.type user.type