mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
新增:组织项目列表返回仓库url
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user