Class: ForestLiana::IntercomController

Inherits:
ApplicationController show all
Defined in:
app/controllers/forest_liana/intercom_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#authenticate_user_from_jwt, #current_user, #serialize_model, #serialize_models

Instance Method Details

#attributesObject



10
11
12
13
14
15
# File 'app/controllers/forest_liana/intercom_controller.rb', line 10

def attributes
  getter = IntercomAttributesGetter.new(params)
  getter.perform

  render json: serialize_model(getter.records)
end

#user_conversationsObject



3
4
5
6
7
8
# File 'app/controllers/forest_liana/intercom_controller.rb', line 3

def user_conversations
  getter = IntercomConversationsGetter.new(params)
  getter.perform

  render json: serialize_models(getter.records, { count: getter.count })
end