12ee2753c1
Enables frozen string for some vestigial files as well as the following: * app/controllers/projects/**/*.rb * app/controllers/sherlock/**/*.rb * app/controllers/snippets/**/*.rb * app/controllers/users/**/*.rb Partially addresses #47424.
20 lines
476 B
Ruby
20 lines
476 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Projects::AvatarsController < Projects::ApplicationController
|
|
include SendsBlob
|
|
|
|
before_action :authorize_admin_project!, only: [:destroy]
|
|
|
|
def show
|
|
@blob = @repository.blob_at_branch(@repository.root_ref, @project.avatar_in_git)
|
|
|
|
send_blob(@blob)
|
|
end
|
|
|
|
def destroy
|
|
@project.remove_avatar!
|
|
@project.save
|
|
|
|
redirect_to edit_project_path(@project, anchor: 'js-general-project-settings'), status: :found
|
|
end
|
|
end
|