feat: delete workspace

This commit is contained in:
Henry
2024-08-30 22:28:07 +01:00
parent 5c8a1c5069
commit a06500a949
19 changed files with 1647 additions and 365 deletions

View File

@@ -149,7 +149,7 @@ export const cardRouter = createTRPCRouter({
);
if (existingLabel) {
await cardRepo.destroyCardLabelRelationship(ctx.db, cardLabelIds);
await cardRepo.hardDeleteCardLabelRelationship(ctx.db, cardLabelIds);
return { newLabel: false };
}
@@ -200,7 +200,7 @@ export const cardRouter = createTRPCRouter({
);
if (existingMember) {
await cardRepo.destroyCardMemberRelationship(ctx.db, cardMemberIds);
await cardRepo.hardDeleteCardMemberRelationship(ctx.db, cardMemberIds);
return { newMember: false };
}
@@ -272,7 +272,7 @@ export const cardRouter = createTRPCRouter({
const deletedAt = new Date().toISOString();
await cardRepo.destroy(ctx.db, {
await cardRepo.softDelete(ctx.db, {
cardId: card.id,
deletedAt,
deletedBy: userId,