Class: Cats::Core::MenusController

Inherits:
ApplicationController show all
Defined in:
app/controllers/cats/core/menus_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#authenticate, #current_user, #skip_bullet

Instance Method Details

#indexObject



6
7
8
9
10
# File 'app/controllers/cats/core/menus_controller.rb', line 6

def index
  menu = @service.fetch_menu(current_user)
  data = ActiveModelSerializers::SerializableResource.new(menu, each_serializer: RoleMenuSerializer)
  render json: {success: true, data: data}
end