mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 00:27:30 +00:00
Fix ts
This commit is contained in:
@@ -198,9 +198,16 @@ export const registerPkiAcmeRouter = async (server: FastifyZodProvider) => {
|
|||||||
},
|
},
|
||||||
// TODO: replace with verify ACME signature here instead
|
// TODO: replace with verify ACME signature here instead
|
||||||
// onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
// onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||||
handler: async (req) => {
|
handler: async (req, res) => {
|
||||||
const result = await server.services.pkiAcme.deactivateAcmeAccount(req.params.profileId, req.params.accountId);
|
return sendAcmeResponse(
|
||||||
return result;
|
res,
|
||||||
|
req.params.profileId,
|
||||||
|
await server.services.pkiAcme.deactivateAcmeAccount({
|
||||||
|
profileId: req.params.profileId,
|
||||||
|
accountId: req.params.accountId,
|
||||||
|
payload: req.body
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -303,9 +303,8 @@ export const pkiAcmeServiceFactory = ({
|
|||||||
return {
|
return {
|
||||||
status: 201,
|
status: 201,
|
||||||
body: {
|
body: {
|
||||||
status: "pending",
|
status: order.status,
|
||||||
// TODO: read config from the profile to get the expiration time instead
|
expires: order.expiresAt.toISOString(),
|
||||||
expires: new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString(),
|
|
||||||
identifiers: order.authorizations.map((auth: TPkiAcmeAuths) => ({
|
identifiers: order.authorizations.map((auth: TPkiAcmeAuths) => ({
|
||||||
type: auth.identifierType,
|
type: auth.identifierType,
|
||||||
value: auth.identifierValue
|
value: auth.identifierValue
|
||||||
|
|||||||
@@ -85,11 +85,15 @@ export type TPkiAcmeServiceFactory = {
|
|||||||
accountId: string;
|
accountId: string;
|
||||||
payload: TCreateAcmeOrderPayload;
|
payload: TCreateAcmeOrderPayload;
|
||||||
}) => Promise<TAcmeResponse<TCreateAcmeOrderResponse>>;
|
}) => Promise<TAcmeResponse<TCreateAcmeOrderResponse>>;
|
||||||
deactivateAcmeAccount: (
|
deactivateAcmeAccount: ({
|
||||||
profileId: string,
|
profileId,
|
||||||
accountId: string,
|
accountId,
|
||||||
body?: TDeactivateAcmeAccountPayload
|
payload
|
||||||
) => Promise<TDeactivateAcmeAccountResponse>;
|
}: {
|
||||||
|
profileId: string;
|
||||||
|
accountId: string;
|
||||||
|
payload?: TDeactivateAcmeAccountPayload;
|
||||||
|
}) => Promise<TAcmeResponse<TDeactivateAcmeAccountResponse>>;
|
||||||
listAcmeOrders: ({
|
listAcmeOrders: ({
|
||||||
profileId,
|
profileId,
|
||||||
accountId
|
accountId
|
||||||
|
|||||||
Reference in New Issue
Block a user