Require container registry entities in controllers
This commit is contained in:
parent
ee6f50027c
commit
ed0547b7c0
|
@ -21,7 +21,7 @@ module Projects
|
|||
private
|
||||
|
||||
def image
|
||||
@image ||= project.container_repositories.find_by(id: params[:id])
|
||||
@image ||= project.container_repositories.find(params[:id])
|
||||
end
|
||||
|
||||
##
|
||||
|
|
|
@ -17,11 +17,13 @@ module Projects
|
|||
|
||||
def repository
|
||||
@image ||= project.container_repositories
|
||||
.find_by(id: params[:repository_id])
|
||||
.find(params[:repository_id])
|
||||
end
|
||||
|
||||
def tag
|
||||
@tag ||= repository.tag(params[:id]) if params[:id].present?
|
||||
return render_404 unless params[:id].present?
|
||||
|
||||
@tag ||= repository.tag(params[:id])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue