mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +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
|
||||
// onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||
handler: async (req) => {
|
||||
const result = await server.services.pkiAcme.deactivateAcmeAccount(req.params.profileId, req.params.accountId);
|
||||
return result;
|
||||
handler: async (req, res) => {
|
||||
return sendAcmeResponse(
|
||||
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 {
|
||||
status: 201,
|
||||
body: {
|
||||
status: "pending",
|
||||
// TODO: read config from the profile to get the expiration time instead
|
||||
expires: new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString(),
|
||||
status: order.status,
|
||||
expires: order.expiresAt.toISOString(),
|
||||
identifiers: order.authorizations.map((auth: TPkiAcmeAuths) => ({
|
||||
type: auth.identifierType,
|
||||
value: auth.identifierValue
|
||||
|
||||
@@ -85,11 +85,15 @@ export type TPkiAcmeServiceFactory = {
|
||||
accountId: string;
|
||||
payload: TCreateAcmeOrderPayload;
|
||||
}) => Promise<TAcmeResponse<TCreateAcmeOrderResponse>>;
|
||||
deactivateAcmeAccount: (
|
||||
profileId: string,
|
||||
accountId: string,
|
||||
body?: TDeactivateAcmeAccountPayload
|
||||
) => Promise<TDeactivateAcmeAccountResponse>;
|
||||
deactivateAcmeAccount: ({
|
||||
profileId,
|
||||
accountId,
|
||||
payload
|
||||
}: {
|
||||
profileId: string;
|
||||
accountId: string;
|
||||
payload?: TDeactivateAcmeAccountPayload;
|
||||
}) => Promise<TAcmeResponse<TDeactivateAcmeAccountResponse>>;
|
||||
listAcmeOrders: ({
|
||||
profileId,
|
||||
accountId
|
||||
|
||||
Reference in New Issue
Block a user