更改:优化commit详情接口

This commit is contained in:
2024-11-14 15:40:30 +08:00
parent 96a70007fd
commit 49e2b35a1e
3 changed files with 6 additions and 6 deletions

View File

@@ -151,7 +151,7 @@ class RepositoriesController < ApplicationController
return render_error('暂未开放,敬请期待.')
else
@commit = Gitea::Repository::Commits::GetService.call(@owner.login, @repository.identifier, @sha, @owner&.gitea_token)
@commit_diff = Gitea::Repository::Commits::GetService.call(@owner.login, @repository.identifier, @sha, @owner&.gitea_token, {diff: true})
# @commit_diff = Gitea::Repository::Commits::GetService.call(@owner.login, @repository.identifier, @sha, @owner&.gitea_token, {diff: true})
render_error(@commit[:message], @commit[:status]) if @commit.has_key?(:status) || @commit_diff.has_key?(:status)
end
end