新增:项目列表返回具体时间

This commit is contained in:
yystopf 2024-07-12 14:58:24 +08:00
parent 99266bce7e
commit f36a0f18ad
2 changed files with 2 additions and 0 deletions

View File

@ -5,5 +5,6 @@ json.projects @projects.each do |project|
json.type project.numerical_for_project_type json.type project.numerical_for_project_type
json.praised project.praised_by?(current_user) json.praised project.praised_by?(current_user)
json.last_update_time render_unix_time(project.updated_on) json.last_update_time render_unix_time(project.updated_on)
json.full_last_update_time project.updated_on
json.time_ago time_from_now(project.updated_on) json.time_ago time_from_now(project.updated_on)
end end

View File

@ -13,6 +13,7 @@ json.is_public project.is_public
json.mirror_url project.repository&.mirror_url json.mirror_url project.repository&.mirror_url
json.type project&.numerical_for_project_type json.type project&.numerical_for_project_type
json.last_update_time render_unix_time(project.updated_on) json.last_update_time render_unix_time(project.updated_on)
json.full_last_update_time project.updated_on
json.time_ago time_from_now(project.updated_on) json.time_ago time_from_now(project.updated_on)
json.forked_from_project_id project.forked_from_project_id json.forked_from_project_id project.forked_from_project_id
json.open_devops project.open_devops? json.open_devops project.open_devops?