Merge branch 'dev_trustie' into dev_chain
This commit is contained in:
commit
ec6e962248
|
@ -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.present? ? @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
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,8 @@ class Gitea::Repository::Entries::ListService < Gitea::ClientService
|
||||||
when 200
|
when 200
|
||||||
body
|
body
|
||||||
else
|
else
|
||||||
{'status': -1, 'message': "#{body['message']}"}
|
Rails.logger.info("########__________has_error_______##########{body['message']}")
|
||||||
|
[]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue