mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into pm_project_develop
This commit is contained in:
@@ -39,7 +39,8 @@ class AttachmentsController < ApplicationController
|
||||
filepath, ref = url.split("/")[-1].split("?")
|
||||
url.gsub!(url.split("/")[-1], '')
|
||||
Rails.logger.info("url===#{url}")
|
||||
request_url = [domain, api_url, URI.encode(url), CGI.escape(filepath), "?ref=#{CGI.escape(ref.split('ref=')[1])}&access_token=#{User.where(admin: true).take&.gitea_token}"].join
|
||||
Rails.logger.info(filepath)
|
||||
request_url = [domain, api_url, URI.encode(url), URI.escape(filepath), "?ref=#{URI.escape(ref.split('ref=')[1])}&access_token=#{User.where(admin: true).take&.gitea_token}"].join
|
||||
Rails.logger.info("request_url===#{request_url}")
|
||||
response = Faraday.get(request_url)
|
||||
filename = filepath
|
||||
|
||||
@@ -3,8 +3,8 @@ owner_common = $redis_cache.hgetall("v2-owner-common:#{project_common["owner_id"
|
||||
json.id item[0]
|
||||
json.score item[1]
|
||||
json.name project_common["name"]
|
||||
if project_common['identifier'].include?("/")
|
||||
json.identifier project_common["identifier"].split('/')[1]
|
||||
if project_common['identifier'].to_s.include?("/")
|
||||
json.identifier project_common["identifier"].to_s.split('/')[1]
|
||||
json.owner do
|
||||
json.id nil
|
||||
json.type 'User'
|
||||
|
||||
5
db/migrate/20231115126452_add_journal_parent_id_index.rb
Normal file
5
db/migrate/20231115126452_add_journal_parent_id_index.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddJournalParentIdIndex < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_index :journals, :parent_id
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user