FIX [api] get pull files and commits bug

This commit is contained in:
Jasder 2021-01-13 14:40:23 +08:00
parent 0aa39efe9b
commit 37be604e82
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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