FIX [api] get pull files and commits bug
This commit is contained in:
parent
0aa39efe9b
commit
37be604e82
|
@ -189,12 +189,12 @@ class PullRequestsController < ApplicationController
|
|||
|
||||
|
||||
def files
|
||||
@files_result = Gitea::PullRequest::FilesService.call(@owner.login, @project.identifier, @pull_request.gpid)
|
||||
@files_result = Gitea::PullRequest::FilesService.call(@owner.login, @project.identifier, @pull_request.gpid, current_user&.gitea_token)
|
||||
# render json: @files_result
|
||||
end
|
||||
|
||||
def commits
|
||||
@commits_result = Gitea::PullRequest::CommitsService.call(@owner.login, @project.identifier, @pull_request.gpid)
|
||||
@commits_result = Gitea::PullRequest::CommitsService.call(@owner.login, @project.identifier, @pull_request.gpid, current_user&.gitea_token)
|
||||
# render json: @commits_result
|
||||
end
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ class Gitea::PullRequest::CommitsService < Gitea::ClientService
|
|||
|
||||
private
|
||||
def params
|
||||
Hash.new.merge(token: owner)
|
||||
Hash.new.merge(token: token)
|
||||
end
|
||||
|
||||
def url
|
||||
|
|
Loading…
Reference in New Issue