Updated

app/models/apps/chatwoot/api_client / user_profile.rb

A
11 lines of codes
1 methods
6.2 complexity/method
2 churn
6.16 complexity
0 duplications
# frozen_string_literal: true module Apps::Chatwoot::ApiClient::UserProfile
  1. Apps::Chatwoot::ApiClient::UserProfile has no descriptive comment
def user_profile response = get_request('/api/v1/profile') return { error: 'Failed to fetch user profile', request: response[:request] } if response[:request].status != 200
  1. Apps::Chatwoot::ApiClient::UserProfile#user_profile calls 'response[:request]' 2 times
  2. Apps::Chatwoot::ApiClient::UserProfile#user_profile refers to 'response' more than self (maybe move it to another class?)
response end end