mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-06 21:54:01 -05:00
fix(templates): only change updatedAt for actual updates to workflow or metadata (#2630)
This commit is contained in:
committed by
GitHub
parent
da1f668272
commit
400178a3b0
@@ -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))
|
||||
|
||||
|
||||
@@ -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))
|
||||
})
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user