2020-08-12 08:10:25 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Groups
|
|
|
|
class ReleasesController < Groups::ApplicationController
|
2020-10-06 08:08:38 -04:00
|
|
|
feature_category :release_evidence
|
|
|
|
|
2020-08-12 08:10:25 -04:00
|
|
|
def index
|
|
|
|
respond_to do |format|
|
|
|
|
format.json do
|
|
|
|
render json: ReleaseSerializer.new.represent(releases)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def releases
|
|
|
|
ReleasesFinder
|
|
|
|
.new(@group, current_user, { include_subgroups: true })
|
|
|
|
.execute(preload: false)
|
|
|
|
.page(params[:page])
|
|
|
|
.per(30)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|