Use @repository

This commit is contained in:
Jacob Vosmaer 2016-02-02 15:06:14 +01:00
parent b1f22aa35a
commit b67f8eee0d
1 changed files with 2 additions and 3 deletions

View File

@ -2,11 +2,10 @@ class Projects::AvatarsController < Projects::ApplicationController
before_action :project
def show
repository = @project.repository
@blob = repository.blob_at_branch('master', @project.avatar_in_git)
@blob = @repository.blob_at_branch('master', @project.avatar_in_git)
if @blob
headers['X-Content-Type-Options'] = 'nosniff'
headers.store(*Gitlab::Workhorse.send_git_blob(repository, @blob))
headers.store(*Gitlab::Workhorse.send_git_blob(@repository, @blob))
headers['Content-Disposition'] = 'inline'
headers['Content-Type'] = @blob.content_type
head :ok # 'render nothing: true' messes up the Content-Type