[ADD]组织项目相关

This commit is contained in:
2021-01-19 19:02:51 +08:00
parent 1dc43a23b7
commit f094fe1799
31 changed files with 406 additions and 56 deletions

View File

@@ -0,0 +1,7 @@
json.total_count @projects.total_count
json.projects @projects.each do |project|
json.(project, :name, :identifier, :description, :forked_count, :praises_count)
json.praised project.praised_by?(current_user)
json.last_update_time render_unix_time(project.updated_on)
json.time_ago time_from_now(project.updated_on)
end

View File

@@ -0,0 +1,7 @@
json.total_count @owners.size
json.owners @owners.each do |owner|
json.id owner.id
json.type owner.type
json.name owner.login
json.avatar_url url_to_avatar(owner)
end

View File

@@ -0,0 +1,4 @@
json.total_count @teams.total_count
json.teams @teams.each do |team|
json.(team, :id, :name, :authorize)
end