mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Fix: Rebase errors
This commit is contained in:
@@ -358,27 +358,6 @@ export const projectServiceFactory = ({
|
||||
return deletedProject;
|
||||
};
|
||||
|
||||
const deleteProjectBySlug = async ({ actor, actorId, actorOrgId, slug }: TDeleteProjectBySlugDTO) => {
|
||||
const project = await projectDAL.findOne({ slug });
|
||||
|
||||
const { permission } = await permissionService.getProjectPermission(actor, actorId, project.id, actorOrgId);
|
||||
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Delete, ProjectPermissionSub.Project);
|
||||
|
||||
const deletedProject = await projectDAL.transaction(async (tx) => {
|
||||
const delProject = await projectDAL.deleteById(project.id, tx);
|
||||
const projectGhostUser = await projectMembershipDAL.findProjectGhostUser(project.id).catch(() => null);
|
||||
|
||||
// Delete the org membership for the ghost user if it's found.
|
||||
if (projectGhostUser) {
|
||||
await userDAL.deleteById(projectGhostUser.id, tx);
|
||||
}
|
||||
|
||||
return delProject;
|
||||
});
|
||||
|
||||
return deletedProject;
|
||||
};
|
||||
|
||||
const getProjects = async (actorId: string) => {
|
||||
const workspaces = await projectDAL.findAllProjects(actorId);
|
||||
return workspaces;
|
||||
|
||||
@@ -36,13 +36,6 @@ export type TDeleteProjectBySlugDTO = {
|
||||
actorOrgId?: string;
|
||||
};
|
||||
|
||||
export type TDeleteProjectBySlugDTO = {
|
||||
slug: string;
|
||||
actor: ActorType;
|
||||
actorId: string;
|
||||
actorOrgId?: string;
|
||||
};
|
||||
|
||||
export type TGetProjectDTO = {
|
||||
filter: Filter;
|
||||
} & Omit<TProjectPermission, "projectId">;
|
||||
@@ -54,13 +47,6 @@ export type TUpdateProjectNameDTO = {
|
||||
name: string;
|
||||
} & TProjectPermission;
|
||||
|
||||
export type TToggleProjectAutoCapitalizationDTO = {
|
||||
autoCapitalization: boolean;
|
||||
} & TProjectPermission;
|
||||
export type TUpdateProjectNameDTO = {
|
||||
name: string;
|
||||
} & TProjectPermission;
|
||||
|
||||
export type TUpdateProjectDTO = {
|
||||
filter: Filter;
|
||||
update: {
|
||||
|
||||
Reference in New Issue
Block a user