diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index aebbcc6ac..2e5d5cd67 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -4,7 +4,6 @@ class RepositoriesController < ApplicationController def show @project = @repo.project - @project.increment!(:visits) @branches_count = Gitea::Repository::BranchesService.new(@user, @repo.identifier).call&.size @commits_count = Gitea::Repository::Commits::ListService.new(@user, @repo.identifier).call[:total_count] @result = Gitea::Repository::GetService.new(@user, @repo.identifier).call @@ -14,6 +13,7 @@ class RepositoriesController < ApplicationController end def entries + @repo.project.increment!(:visits) @ref = params[:branch] || "master" @entries = Gitea::Repository::Entries::ListService.new(@user, @repo.identifier, ref:@ref).call @entries = @entries.sort_by{ |hash| hash['type'] }