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

list_service.rb « boards « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: edd1cc7c2e116ff1aab8cfc995ce3e0fbcb28753 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

module Boards
  class ListService < Boards::BaseService
    def execute
      create_board! if parent.boards.empty?
      boards
    end

    private

    def boards
      parent.boards
    end

    def create_board!
      Boards::CreateService.new(parent, current_user).execute
    end
  end
end