Fix: Rebase errors

This commit is contained in:
Daniel Hougaard
2024-03-12 17:21:27 +01:00
parent 307b89e799
commit 30e7fe8a45
2 changed files with 0 additions and 35 deletions

View File

@@ -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;

View File

@@ -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: {