feat: updated to enum ActionProjectType

This commit is contained in:
=
2025-01-14 23:26:18 +05:30
parent d721a46ec9
commit 6f38d6c76f
46 changed files with 347 additions and 350 deletions
@@ -1,7 +1,7 @@
import slugify from "@sindresorhus/slugify";
import ms from "ms";
import { ProjectMembershipRole, ProjectOperationType } from "@app/db/schemas";
import { ActionProjectType, ProjectMembershipRole } from "@app/db/schemas";
import { getConfig } from "@app/lib/config/env";
import { BadRequestError, ForbiddenRequestError, NotFoundError } from "@app/lib/errors";
import { alphaNumericNanoId } from "@app/lib/nanoid";
@@ -106,7 +106,7 @@ export const accessApprovalRequestServiceFactory = ({
projectId: project.id,
actorAuthMethod,
actorOrgId,
projectOperationType: ProjectOperationType.SecretManager
projectOperationType: ActionProjectType.SecretManager
});
if (!membership) {
throw new ForbiddenRequestError({ message: "You are not a member of this project" });
@@ -280,7 +280,7 @@ export const accessApprovalRequestServiceFactory = ({
projectId: project.id,
actorAuthMethod,
actorOrgId,
projectOperationType: ProjectOperationType.SecretManager
projectOperationType: ActionProjectType.SecretManager
});
if (!membership) {
throw new ForbiddenRequestError({ message: "You are not a member of this project" });
@@ -326,7 +326,7 @@ export const accessApprovalRequestServiceFactory = ({
projectId: accessApprovalRequest.projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ProjectOperationType.SecretManager
projectOperationType: ActionProjectType.SecretManager
});
if (!membership) {
@@ -431,7 +431,7 @@ export const accessApprovalRequestServiceFactory = ({
projectId: project.id,
actorAuthMethod,
actorOrgId,
projectOperationType: ProjectOperationType.SecretManager
projectOperationType: ActionProjectType.SecretManager
});
if (!membership) {
throw new ForbiddenRequestError({ message: "You are not a member of this project" });