Browse Source

修改commits报错

tags/v1
sylor_huang@126.com 6 years ago
parent
commit
9784564c01
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      app/controllers/repositories_controller.rb
  2. +1
    -1
      app/views/repositories/commits.json.jbuilder

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

@@ -45,6 +45,7 @@ class RepositoriesController < ApplicationController
end
def commits
@create_user = @project.owner
@hash_commit = Gitea::Repository::Commits::ListService.new(@project.owner.login, @project.identifier,
sha: params[:sha], page: params[:page], limit: params[:limit], token: current_user&.gitea_token).call
end


+ 1
- 1
app/views/repositories/commits.json.jbuilder View File

@@ -9,7 +9,7 @@ else
json.message commit['commit']['message']
json.timestamp render_unix_time(commit['commit']['author']['date'])
json.time_from_now time_from_now(commit['commit']['author']['date'])
json.partial! 'author', user: @project.owner
json.partial! 'author', locals: {user: @create_user}
end
end
end


Loading…
Cancel
Save