Updated

app/use_cases/accounts/apps/chatwoots / get_inboxes.rb

A
12 lines of codes
1 methods
12.1 complexity/method
3 churn
12.08 complexity
0 duplications
class Accounts::Apps::Chatwoots::GetInboxes
  1. Accounts::Apps::Chatwoots::GetInboxes has no descriptive comment
def self.call(chatwoot) inboxes_request = Faraday.get( "#{chatwoot.chatwoot_endpoint_url}/api/v1/accounts/#{chatwoot.chatwoot_account_id}/inboxes", {}, chatwoot.request_headers ) return { ok: JSON.parse(inboxes_request.body)['payload'] } if inboxes_request.status == 200
  1. Accounts::Apps::Chatwoots::GetInboxes#self.call calls 'inboxes_request.body' 2 times Locations: 0 1
{ error: inboxes_request.body }
  1. Accounts::Apps::Chatwoots::GetInboxes#self.call calls 'inboxes_request.body' 2 times Locations: 0 1
end end