From 3ab062e3cb6432621715ee652b430235780c7cc4 Mon Sep 17 00:00:00 2001 From: Vikhyath Mondreti Date: Mon, 29 Dec 2025 12:06:36 -0800 Subject: [PATCH] fix(templates): only change updatedAt for actual updates to workflow or metadata --- 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 6feef0f32f..5e1e4e8c94 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 d7e23c9d45..8f9fc19a0a 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 3ffb9f5b27..26ab63a65a 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