Class: Booth::Adminland::Credentials::Create

Inherits:
Object
  • Object
show all
Includes:
Logging, Calls
Defined in:
lib/booth/adminland/credentials/create.rb

Instance Method Summary collapse

Instance Method Details

#callObject



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/booth/adminland/credentials/create.rb', line 14

def call
  creation = ::Booth::Core::Credentials::Create.call(domain:, scope:, username:)

  return creation if creation.failure?

  # Not exposing the ActiveRecord model outside of Booth.
  Tron.success :credential_created, id: creation.credential.id,
                                    domain: creation.credential.domain,
                                    scope: creation.credential.scope,
                                    username: creation.credential.username
end