# Copyright (C) 2024 Manuel Bustillo

class GroupsController < ApplicationController
  def index
    roots = Group.where(parent_id: nil)
    render jsonapi: roots, include: [children: [children: [:children]]]
  end
end