新增: 用户项目列表以及helper方法

This commit is contained in:
2022-06-23 12:19:03 +08:00
parent d14bf35ca1
commit 5d0849a148
7 changed files with 66 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
if project.present?
json.type @project.project_type
json.type project.project_type
json.(project,
:description, :forked_count, :forked_from_project_id, :identifier,
:issues_count, :pull_requests_count, :invite_code, :website, :platform,

View File

@@ -0,0 +1,5 @@
json.total_count @projects.total_count
json.projects @projects do |project|
json.partial! "api/v1/projects/simple_detail", project: project
end