新增:组织项目列表返回仓库url

This commit is contained in:
yystopf 2023-11-17 09:32:30 +08:00
parent 0eea1c7d65
commit c2f64adf17
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