diff --git a/src/backend/internal/certificate.js b/src/backend/internal/certificate.js index f37effe..56c8617 100644 --- a/src/backend/internal/certificate.js +++ b/src/backend/internal/certificate.js @@ -756,7 +756,19 @@ const internalCertificate = { .patchAndFetchById(certificate.id, { expires_on: certificateModel.raw('FROM_UNIXTIME(' + cert_info.dates.to + ')') }); - }); + }) + .then((updated_certificate) => { + // Add to audit log + return internalAuditLog.add(access, { + action: 'renewed', + object_type: 'certificate', + object_id: updated_certificate.id, + meta: updated_certificate + }) + .then(() => { + return certificate; + }); + }) } else { throw new error.ValidationError('Only Let\'sEncrypt certificates can be renewed'); } diff --git a/src/frontend/js/i18n/messages.json b/src/frontend/js/i18n/messages.json index fff42c1..3d4d0ae 100644 --- a/src/frontend/js/i18n/messages.json +++ b/src/frontend/js/i18n/messages.json @@ -231,6 +231,7 @@ "deleted": "Deleted {name}", "enabled": "Enabled {name}", "disabled": "Disabled {name}", + "renewed": "Renewed {name}", "meta-title": "Details for Event", "view-meta": "View Details", "date": "Date"