mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
FIX get mirror url bug
This commit is contained in:
@@ -41,7 +41,7 @@ module ProjectsHelper
|
||||
tmp_json = tmp_json.merge({
|
||||
mirror_status: repo.mirror_status,
|
||||
mirror_num: repo.mirror_num,
|
||||
mirror_url: repo.source_clone_url || repo.mirror_url,
|
||||
mirror_url: repo.remote_mirror_url,
|
||||
first_sync: repo.first_sync?
|
||||
})
|
||||
end
|
||||
|
||||
@@ -78,4 +78,9 @@ class Repository < ApplicationRecord
|
||||
end
|
||||
end
|
||||
|
||||
def remote_mirror_url
|
||||
source_clone_url.blank? ? mirror_url : source_clone_url
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user