Browse Source

新增: commit找不到返回404

pull/313/head
yystopf 3 years ago
parent
commit
32db15aad5
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      app/controllers/repositories_controller.rb

+ 1
- 0
app/controllers/repositories_controller.rb View File

@@ -137,6 +137,7 @@ class RepositoriesController < ApplicationController
else
@commit = Gitea::Repository::Commits::GetService.call(@owner.login, @repository.identifier, @sha, current_user&.gitea_token)
@commit_diff = Gitea::Repository::Commits::GetService.call(@owner.login, @repository.identifier, @sha, current_user&.gitea_token, {diff: true})
render_error(@commit[:message], @commit[:status]) if @commit.has_key?(:status) || @commit_diff.has_key?(:status)
end
end


Loading…
Cancel
Save