You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: delete_account_controller.rb
    path of file: ./repos/identity-idp/app/controllers/account_reset
    
    the code of the file until where you have to start completion: module AccountReset
  class DeleteAccountController < ApplicationController
    def show
      render :show and return unless token

      result = AccountReset::ValidateGrantedToken.new(token, request, analytics).call
      analytics.account_reset
    
    def delete
      granted_token = session.delete(:granted_token)
      result = AccountReset::DeleteAccount.new(granted_token, request, analytics).call
      analytics.account_reset_delete(**result.to_h.except(:email))

      if result.success?
        handle_successful_deletion(result)
      else
        handle_invalid_token(result)
      end