Updated

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

A
11 lines of codes
1 methods
7.3 complexity/method
7 churn
7.34 complexity
0 duplications
class Accounts::Apps::Chatwoots::Create
  1. Accounts::Apps::Chatwoots::Create has no descriptive comment
def self.call(account, chatwoot_params) chatwoot = account.apps_chatwoots.build(chatwoot_params) if chatwoot.save Accounts::Apps::Chatwoots::SyncChatwootWorker.perform_async(account.id, chatwoot.id) { ok: chatwoot } else { error: chatwoot } end end end