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

15 lines
260 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?
parent.boards
end
private
def create_board!
2017-08-28 17:56:49 -04:00
Boards::CreateService.new(parent, current_user).execute
end
end
end