From 400178a3b0ba6ee0c11f9b976122dac83ec1d174 Mon Sep 17 00:00:00 2001 From: Vikhyath Mondreti Date: Mon, 29 Dec 2025 12:11:32 -0800 Subject: [PATCH] fix(templates): only change updatedAt for actual updates to workflow or metadata (#2630) --- apps/sim/app/api/templates/[id]/route.ts | 1 - apps/sim/app/api/templates/[id]/star/route.ts | 2 -- apps/sim/app/api/templates/[id]/use/route.ts | 1 - 3 files changed, 4 deletions(-) diff --git a/apps/sim/app/api/templates/[id]/route.ts b/apps/sim/app/api/templates/[id]/route.ts index 6feef0f32..5e1e4e8c9 100644 --- a/apps/sim/app/api/templates/[id]/route.ts +++ b/apps/sim/app/api/templates/[id]/route.ts @@ -70,7 +70,6 @@ export async function GET(request: NextRequest, { params }: { params: Promise<{ .update(templates) .set({ views: sql`${templates.views} + 1`, - updatedAt: new Date(), }) .where(eq(templates.id, id)) diff --git a/apps/sim/app/api/templates/[id]/star/route.ts b/apps/sim/app/api/templates/[id]/star/route.ts index d7e23c9d4..8f9fc19a0 100644 --- a/apps/sim/app/api/templates/[id]/star/route.ts +++ b/apps/sim/app/api/templates/[id]/star/route.ts @@ -100,7 +100,6 @@ export async function POST(request: NextRequest, { params }: { params: Promise<{ .update(templates) .set({ stars: sql`${templates.stars} + 1`, - updatedAt: new Date(), }) .where(eq(templates.id, id)) }) @@ -160,7 +159,6 @@ export async function DELETE( .update(templates) .set({ stars: sql`GREATEST(${templates.stars} - 1, 0)`, - updatedAt: new Date(), }) .where(eq(templates.id, id)) }) diff --git a/apps/sim/app/api/templates/[id]/use/route.ts b/apps/sim/app/api/templates/[id]/use/route.ts index 3ffb9f5b2..26ab63a65 100644 --- a/apps/sim/app/api/templates/[id]/use/route.ts +++ b/apps/sim/app/api/templates/[id]/use/route.ts @@ -136,7 +136,6 @@ export async function POST(request: NextRequest, { params }: { params: Promise<{ // Prepare template update data const updateData: any = { views: sql`${templates.views} + 1`, - updatedAt: now, } // If connecting to template for editing, also update the workflowId