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.

minor changes

Steven Teyd13af2134d65
diff --git a/apps/web/app/(ee)/api/admin/ban/route.ts b/apps/web/app/(ee)/api/admin/ban/route.ts
index 0074cf8ea4..a80bd3d6d4 100644
--- a/apps/web/app/(ee)/api/admin/ban/route.ts
+++ b/apps/web/app/(ee)/api/admin/ban/route.ts
@@ -43,17 +43,10 @@ export const POST = withAdmin(async ({ req }) => {
);
waitUntil(
- Promise.allSettled(
+ Promise.all(
user.projects.map(({ project }) => deleteWorkspaceAdmin(project)),
).then(async () => {
- await Promise.allSettled([
- // delete user
- prisma.user.delete({
- where: {
- id: user.id,
- },
- }),
- // if the user has a custom avatar, delete it
+ await Promise.all([
user.image &&
isStored(user.image) &&
storage.delete(user.image.replace(`${R2_URL}/`, "")),
@@ -63,6 +56,13 @@ export const POST = withAdmin(async ({ req }) => {
value: email,
}),
]);
+
+ // delete user
+ await prisma.user.delete({
+ where: {
+ id: user.id,
+ },
+ });
}),
);
diff --git a/apps/web/ui/folders/folder-dropdown.tsx b/apps/web/ui/folders/folder-dropdown.tsx
index 02a93cf500..2e21cd5d13 100644
--- a/apps/web/ui/folders/folder-dropdown.tsx
+++ b/apps/web/ui/folders/folder-dropdown.tsx
@@ -226,7 +226,7 @@ export const FolderDropdown = ({
) : undefined
}
optionRight={(option) =>
- option.meta && "linksCount" in option.meta ? (
+ option.meta && option.meta.linksCount ? (
<span className="text-xs text-neutral-500">
{option.meta.type === "mega"
? "10,000+"