mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 02:51:51 +00:00
Finish docs for pki alerting + expose endpoints
This commit is contained in:
@@ -144,6 +144,7 @@ export const pkiCollectionServiceFactory = ({
|
||||
|
||||
const getPkiCollectionItems = async ({
|
||||
collectionId,
|
||||
type,
|
||||
offset = 0,
|
||||
limit = 25,
|
||||
actorId,
|
||||
@@ -164,16 +165,23 @@ export const pkiCollectionServiceFactory = ({
|
||||
|
||||
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Read, ProjectPermissionSub.PkiCollections);
|
||||
|
||||
const pkiCollectionItems = await pkiCollectionItemDAL.find(
|
||||
{ pkiCollectionId: collectionId },
|
||||
{ offset, limit, sort: [["createdAt", "desc"]] }
|
||||
);
|
||||
const pkiCollectionItems = await pkiCollectionItemDAL.findPkiCollectionItems({
|
||||
collectionId,
|
||||
type,
|
||||
offset,
|
||||
limit
|
||||
});
|
||||
|
||||
const count = await pkiCollectionItemDAL.countItemsInPkiCollection(collectionId);
|
||||
|
||||
return {
|
||||
pkiCollection,
|
||||
pkiCollectionItems: pkiCollectionItems.map(transformPkiCollectionItem),
|
||||
pkiCollectionItems: pkiCollectionItems.map((p) => ({
|
||||
...transformPkiCollectionItem(p),
|
||||
notBefore: p.notBefore,
|
||||
notAfter: p.notAfter,
|
||||
friendlyName: p.friendlyName
|
||||
})),
|
||||
totalCount: count
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user