mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-24 13:45:44 +08:00
Merge branch 'dev_trustie' into dev_chain
This commit is contained in:
@@ -28,7 +28,7 @@ class RepositoriesController < ApplicationController
|
|||||||
@project.increment!(:visits)
|
@project.increment!(:visits)
|
||||||
@project_owner = @project.owner
|
@project_owner = @project.owner
|
||||||
@entries = Gitea::Repository::Entries::ListService.new(@project_owner, @project.identifier, ref: @ref).call
|
@entries = Gitea::Repository::Entries::ListService.new(@project_owner, @project.identifier, ref: @ref).call
|
||||||
@entries = @entries["status"].to_i == 1 ? @entries.sort_by{ |hash| hash['type'] } : []
|
@entries = @entries["status"].to_i != -1 ? @entries.sort_by{ |hash| hash['type'] } : []
|
||||||
@path = Gitea.gitea_config[:domain]+"/#{@project.owner.login}/#{@project.identifier}/raw/branch/#{@ref}/"
|
@path = Gitea.gitea_config[:domain]+"/#{@project.owner.login}/#{@project.identifier}/raw/branch/#{@ref}/"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class Gitea::Repository::Entries::ListService < Gitea::ClientService
|
|||||||
body = JSON.parse(response.body)
|
body = JSON.parse(response.body)
|
||||||
case response.status
|
case response.status
|
||||||
when 200
|
when 200
|
||||||
body.merge!({"status": 1})
|
body
|
||||||
else
|
else
|
||||||
{'status': -1, 'message': "#{body['message']}"}
|
{'status': -1, 'message': "#{body['message']}"}
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user