Welcome to mirror list, hosted at ThFree Co, Russian Federation.

value_streams_controller.rb « cycle_analytics « analytics « projects « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 03dcb164d947a2b28963efa9aaa008a6c1387248 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

class Projects::Analytics::CycleAnalytics::ValueStreamsController < Projects::ApplicationController
  respond_to :json

  feature_category :planning_analytics

  before_action :authorize_read_cycle_analytics!

  def index
    # FOSS users can only see the default value stream
    value_streams = [Analytics::CycleAnalytics::ProjectValueStream.build_default_value_stream(@project)]

    render json: Analytics::CycleAnalytics::ValueStreamSerializer.new.represent(value_streams)
  end
end