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
|
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
|
# render json: @files_result
|
||||||
end
|
end
|
||||||
|
|
||||||
def commits
|
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
|
# render json: @commits_result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Gitea::PullRequest::CommitsService < Gitea::ClientService
|
||||||
|
|
||||||
private
|
private
|
||||||
def params
|
def params
|
||||||
Hash.new.merge(token: owner)
|
Hash.new.merge(token: token)
|
||||||
end
|
end
|
||||||
|
|
||||||
def url
|
def url
|
||||||
|
|
Loading…
Reference in New Issue