Get all authorizations

This commit is contained in:
Fang-Pen Lin
2025-11-07 09:18:24 -08:00
parent 80904b1dd1
commit d880c4c6c9
@@ -260,10 +260,11 @@ export const pkiAcmeServiceFactory = ({
accountId: account.id, accountId: account.id,
status: AcmeOrderStatus.Pending status: AcmeOrderStatus.Pending
}); });
payload.identifiers.forEach(async (identifier) => { const authorizations = await Promise.all(
payload.identifiers.map(async (identifier) => {
if (identifier.type === AcmeIdentifierType.DNS) { if (identifier.type === AcmeIdentifierType.DNS) {
// TODO: reuse existing authorizations for this identifier if they exist // TODO: reuse existing authorizations for this identifier if they exist
const auth = await acmeAuthDAL.create({ return await acmeAuthDAL.create({
accountId: account.id, accountId: account.id,
status: AcmeAuthStatus.Pending, status: AcmeAuthStatus.Pending,
identifierType: identifier.type, identifierType: identifier.type,
@@ -274,7 +275,8 @@ export const pkiAcmeServiceFactory = ({
} else { } else {
throw new AcmeMalformedError({ detail: "Only DNS identifiers are supported" }); throw new AcmeMalformedError({ detail: "Only DNS identifiers are supported" });
} }
}); })
);
// FIXME: Implement ACME new order creation // FIXME: Implement ACME new order creation
const orderId = "FIXME-order-id"; const orderId = "FIXME-order-id";