Class: Booth::Userland::Webauths::Destroy

Inherits:
Object
  • Object
show all
Includes:
Concerns::Action
Defined in:
lib/booth/userland/webauths/destroy.rb

Instance Method Summary collapse

Instance Method Details

#callObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/booth/userland/webauths/destroy.rb', line 7

def call
  request.must_be_delete!
  request.must_be_html!
  request.must_be_logged_in!

  ::Booth::Userland::Webauths::Guards::Manageable.call(credential:) { return _1 }
  ::Booth::Userland::Webauths::Guards::Sudo.call(request:, credential:) { return _1 }

  do_require_eligible_credential
    .on_success { do_find_authenticator }
    .on_success { do_destroy_authenticator }
    .on_success { do_update_credential }
end