Merge pull request '组织项目列表返回仓库url' (#221) from yystopf/forgeplus:pm_project_develop into pm_project_develop

This commit is contained in:
yystopf 2023-11-17 09:36:49 +08:00
commit a0e34c9ddd
2 changed files with 6 additions and 0 deletions

View File

@ -485,6 +485,11 @@ class Project < ApplicationRecord
return JSON.parse(cache_result)
end
end
def full_url
Rails.application.config_for(:configuration)['platform_url'] + '/' + self.owner.try(:login) + '/' + self.identifier
end
def to_builder
Jbuilder.new do |project|
project.id self.id

View File

@ -25,4 +25,5 @@ json.projects @projects.each do |project|
json.topics project.project_topics.each do |topic|
json.(topic, :id, :name)
end
json.url project.full_url
end