diff --git a/api/sshRekey.go b/api/sshRekey.go index 530b9df3..234a6df5 100644 --- a/api/sshRekey.go +++ b/api/sshRekey.go @@ -71,8 +71,7 @@ func (h *caHandler) SSHRekey(w http.ResponseWriter, r *http.Request) { return } - w.WriteHeader(http.StatusCreated) - JSON(w, &SSHSignResponse{ + JSONStatus(w, &SSHSignResponse{ Certificate: SSHCertificate{newCert}, - }) + }, http.StatusCreated) } diff --git a/api/sshRenew.go b/api/sshRenew.go index 3aea01bb..4324ebba 100644 --- a/api/sshRenew.go +++ b/api/sshRenew.go @@ -61,8 +61,7 @@ func (h *caHandler) SSHRenew(w http.ResponseWriter, r *http.Request) { return } - w.WriteHeader(http.StatusCreated) - JSON(w, &SSHSignResponse{ + JSONStatus(w, &SSHSignResponse{ Certificate: SSHCertificate{newCert}, - }) + }, http.StatusCreated) }