blob: 878c82cd1838878e759d1c6f84d8370d544d3b8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
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
|