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.

revert to /logos

Steven Tey74cd5d94db70
diff --git a/apps/web/app/api/workspaces/[idOrSlug]/logo/route.ts b/apps/web/app/api/workspaces/[idOrSlug]/logo/route.ts
index d15daba931..15afd2d63e 100644
--- a/apps/web/app/api/workspaces/[idOrSlug]/logo/route.ts
+++ b/apps/web/app/api/workspaces/[idOrSlug]/logo/route.ts
@@ -13,10 +13,7 @@ export const POST = withAuth(
async ({ req, workspace }) => {
const { image } = uploadLogoSchema.parse(await req.json());
- const { url } = await storage.upload(
- `workspaces/${workspace.id}/logo`,
- image,
- );
+ const { url } = await storage.upload(`logos/${workspace.id}`, image);
const response = await prisma.project.update({
where: { id: workspace.id },
diff --git a/apps/web/lib/api/workspaces.ts b/apps/web/lib/api/workspaces.ts
index 1111cf46d3..e9041c581c 100644
--- a/apps/web/lib/api/workspaces.ts
+++ b/apps/web/lib/api/workspaces.ts
@@ -76,7 +76,7 @@ export async function deleteWorkspace(
const deleteWorkspaceResponse = await Promise.all([
// delete workspace logo if it's a custom logo stored in R2
workspace.logo?.startsWith(process.env.STORAGE_BASE_URL as string) &&
- storage.delete(`workspaces/${workspace.id}/logo`),
+ storage.delete(`logos/${workspace.id}`),
// if they have a Stripe subscription, cancel it
workspace.stripeId && cancelSubscription(workspace.stripeId),
// delete the workspace
@@ -132,7 +132,7 @@ export async function deleteWorkspaceAdmin(
const deleteWorkspaceResponse = await Promise.all([
// delete workspace logo if it's a custom logo stored in R2
workspace.logo?.startsWith(process.env.STORAGE_BASE_URL as string) &&
- storage.delete(`workspaces/${workspace.id}/logo`),
+ storage.delete(`logos/${workspace.id}`),
// if they have a Stripe subscription, cancel it
workspace.stripeId && cancelSubscription(workspace.stripeId),
// delete the workspace