feat: added collection selection for cert template

This commit is contained in:
Sheen Capadngan
2024-08-16 19:40:23 +08:00
parent 69925721cc
commit 97f5c33aea
11 changed files with 116 additions and 59 deletions
@@ -28,6 +28,7 @@ export const certificateTemplateServiceFactory = ({
}: TCertificateTemplateServiceFactoryDep) => {
const createCertTemplate = async ({
caId,
pkiCollectionId,
name,
commonName,
subjectAlternativeName,
@@ -58,6 +59,7 @@ export const certificateTemplateServiceFactory = ({
const certificateTemplate = await certificateTemplateDAL.create({
caId,
pkiCollectionId,
name,
commonName,
subjectAlternativeName,
@@ -70,6 +72,7 @@ export const certificateTemplateServiceFactory = ({
const updateCertTemplate = async ({
id,
caId,
pkiCollectionId,
name,
commonName,
subjectAlternativeName,
@@ -110,6 +113,7 @@ export const certificateTemplateServiceFactory = ({
const updatedCertTemplate = await certificateTemplateDAL.updateById(certTemplate.id, {
caId,
pkiCollectionId,
commonName,
subjectAlternativeName,
name,
@@ -2,6 +2,7 @@ import { TProjectPermission } from "@app/lib/types";
export type TCreateCertTemplateDTO = {
caId: string;
pkiCollectionId?: string;
name: string;
commonName: string;
subjectAlternativeName: string;
@@ -11,6 +12,7 @@ export type TCreateCertTemplateDTO = {
export type TUpdateCertTemplateDTO = {
id: string;
caId?: string;
pkiCollectionId?: string;
name?: string;
commonName?: string;
subjectAlternativeName?: string;