1
0
Fork 0

Improve code

This commit is contained in:
Alex Kotov 2019-09-13 22:16:04 +05:00
parent ac18d6f7bc
commit e991b9761c
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -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