domains: update event not generated

This commit is contained in:
Girish Ramakrishnan
2022-11-14 10:58:32 +01:00
parent 0843baad8b
commit 7b7e5d24de

View File

@@ -242,9 +242,7 @@ async function setConfig(domain, data, auditSource) {
const result = await database.query('UPDATE domains SET ' + fields.join(', ') + ' WHERE domain=?', args);
if (result.affectedRows === 0) throw new BoxError(BoxError.NOT_FOUND, 'Domain not found');
if (!fallbackCertificate) return;
await reverseProxy.setFallbackCertificate(domain, fallbackCertificate);
if (fallbackCertificate) await reverseProxy.setFallbackCertificate(domain, fallbackCertificate);
await eventlog.add(eventlog.ACTION_DOMAIN_UPDATE, auditSource, { domain, zoneName, provider });
}