Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update route.ts

Kiran K19aeac9d81c1
diff --git a/apps/web/app/api/folders/[folderId]/route.ts b/apps/web/app/api/folders/[folderId]/route.ts
index 51d2196d22..4e50da2dc5 100644
--- a/apps/web/app/api/folders/[folderId]/route.ts
+++ b/apps/web/app/api/folders/[folderId]/route.ts
@@ -118,6 +118,7 @@ export const DELETE = withWorkspace(
folderId,
},
});
+
// if there are no links associated with the folder, we can just delete it
if (linksCount === 0) {
await prisma.folder.delete({