Fix code style
This commit is contained in:
parent
1f9708e7ae
commit
3df7acd095
1 changed files with 10 additions and 6 deletions
|
@ -35,12 +35,7 @@ class Staffs::X509CertificatesController < ApplicationController
|
|||
result = CreateRSAKeysAndX509SelfSignedCertificate.call \
|
||||
@x509_certificate_form.attributes
|
||||
|
||||
redirect_to staff_x509_certificate_url(
|
||||
result.certificate,
|
||||
private_key_secret: Base64.urlsafe_encode64(
|
||||
result.public_key.private_key_pem_secret,
|
||||
),
|
||||
)
|
||||
redirect_to after_create_url result.certificate, result.public_key
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -56,4 +51,13 @@ private
|
|||
:not_after,
|
||||
)
|
||||
end
|
||||
|
||||
def after_create_url(certificate, public_key)
|
||||
staff_x509_certificate_url(
|
||||
certificate,
|
||||
private_key_secret: Base64.urlsafe_encode64(
|
||||
public_key.private_key_pem_secret,
|
||||
),
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Reference in a new issue