1
0
Fork 0

Fix code style

This commit is contained in:
Alex Kotov 2019-09-12 07:02:03 +05:00
parent 1f9708e7ae
commit 3df7acd095
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

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