gitlab-org--gitlab-foss/app/services/boards/list_service.rb

19 lines
297 B
Ruby
Raw Normal View History

module Boards
2017-08-28 17:56:49 -04:00
class ListService < Boards::BaseService
def execute
2017-08-28 17:56:49 -04:00
create_board! if parent.boards.empty?
2018-03-28 14:32:13 -04:00
boards
end
private
2018-03-28 14:32:13 -04:00
def boards
parent.boards
end
def create_board!
2017-08-28 17:56:49 -04:00
Boards::CreateService.new(parent, current_user).execute
end
end
end