mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-01 21:46:38 +00:00
Always update the domain even if wildcard changes
This commit is contained in:
@@ -312,8 +312,7 @@ async function syncAcmeCerts(
|
|||||||
.from(certificates)
|
.from(certificates)
|
||||||
.where(
|
.where(
|
||||||
and(
|
and(
|
||||||
eq(certificates.domain, domain),
|
eq(certificates.domain, domain)
|
||||||
eq(certificates.wildcard, wildcard)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.limit(1);
|
.limit(1);
|
||||||
@@ -392,6 +391,9 @@ async function syncAcmeCerts(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (existing.length > 0) {
|
if (existing.length > 0) {
|
||||||
|
logger.debug(
|
||||||
|
`acmeCertSync: updating existing certificate for ${domain} (expires ${expiresAt ? new Date(expiresAt * 1000).toISOString() : "unknown"})`
|
||||||
|
);
|
||||||
await db
|
await db
|
||||||
.update(certificates)
|
.update(certificates)
|
||||||
.set({
|
.set({
|
||||||
@@ -416,6 +418,9 @@ async function syncAcmeCerts(
|
|||||||
oldKeyPem
|
oldKeyPem
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
logger.debug(
|
||||||
|
`acmeCertSync: inserting new certificate for ${domain} (expires ${expiresAt ? new Date(expiresAt * 1000).toISOString() : "unknown"})`
|
||||||
|
);
|
||||||
await db.insert(certificates).values({
|
await db.insert(certificates).values({
|
||||||
domain,
|
domain,
|
||||||
domainId,
|
domainId,
|
||||||
|
|||||||
Reference in New Issue
Block a user