blob: 2901d83fcefbcc542211ca5b866f614d292ed949 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
module Projects
module Registry
class RepositoriesController < ::Projects::Registry::ApplicationController
before_action :authorize_update_container_image!, only: [:destroy]
def index
@images = project.container_repositories
end
def destroy
if image.destroy
redirect_to project_container_registry_path(@project),
notice: 'Images repository has been removed successfully!'
else
redirect_to project_container_registry_path(@project),
alert: 'Failed to remove images repository!'
end
end
private
def image
@image ||= project.container_repositories.find_by(id: params[:id])
end
end
end
end
|