Improve code
This commit is contained in:
parent
ac18d6f7bc
commit
e991b9761c
1 changed files with 3 additions and 3 deletions
|
@ -35,7 +35,7 @@ class Staffs::X509CertificatesController < ApplicationController
|
|||
result = CreateRSAKeysAndX509SelfSignedCertificate.call \
|
||||
@x509_certificate_form.attributes
|
||||
|
||||
redirect_to after_create_url result.certificate, result.key
|
||||
redirect_to after_create_url result.certificate
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -52,11 +52,11 @@ private
|
|||
)
|
||||
end
|
||||
|
||||
def after_create_url(certificate, key)
|
||||
def after_create_url(certificate)
|
||||
staff_x509_certificate_url(
|
||||
certificate,
|
||||
private_key_pem_secret: Base64.urlsafe_encode64(
|
||||
key.private_key_pem_secret,
|
||||
certificate.rsa_key.private_key_pem_secret,
|
||||
),
|
||||
)
|
||||
end
|
||||
|
|
Reference in a new issue