RUBYCRITIC
class Accounts::Apps::Chatwoots::Create - 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