mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
更改:获取标签详情特殊符号处理
This commit is contained in:
@@ -12,10 +12,6 @@ class Api::V1::Projects::Tags::GetService < ApplicationService
|
||||
@repo = project&.identifier
|
||||
@tag_name = tag_name.to_s
|
||||
@token = token
|
||||
Rails.logger.info project&.owner&.login
|
||||
Rails.logger.info project&.identifier
|
||||
Rails.logger.info tag_name
|
||||
Rails.logger.info token
|
||||
end
|
||||
|
||||
def call
|
||||
@@ -27,8 +23,6 @@ class Api::V1::Projects::Tags::GetService < ApplicationService
|
||||
load_gitea_data
|
||||
|
||||
gitea_data
|
||||
rescue
|
||||
raise Error, "服务器错误,请联系系统管理员!"
|
||||
end
|
||||
|
||||
private
|
||||
@@ -41,7 +35,7 @@ class Api::V1::Projects::Tags::GetService < ApplicationService
|
||||
end
|
||||
|
||||
def load_gitea_data
|
||||
@gitea_data = $gitea_hat_client.get_repos_tags_by_owner_repo_tag(owner, repo, tag_name, {query: request_params}) rescue nil
|
||||
@gitea_data = $gitea_hat_client.get_repos_tags_by_owner_repo_tag(owner, repo, URI.escape(tag_name), {query: request_params}) rescue nil
|
||||
raise Error, '获取标签失败!' unless @gitea_data.is_a?(Hash)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user